From d01a9f8bc4be2c54027b66fc41f566d41d3c030a Mon Sep 17 00:00:00 2001 From: "ted.mielczarek@gmail.com" Date: Tue, 26 Jul 2011 12:00:20 +0000 Subject: =?UTF-8?q?Fix=20compilation=20using=20the=20OS=20X=2010.7=20SDK?= =?UTF-8?q?=20by=20#ifdefing=20out=20PPC=20support=20when=20targeting=2010?= =?UTF-8?q?.7,=20as=20PPC=20support=20has=20been=20removed=20from=20the=20?= =?UTF-8?q?10.7=20SDK=20A=3DRafael=20=C3=81vila=20de=20Esp=C3=ADndola=20,=20R=3Dted=20at=20https://bugzilla.mozil?= =?UTF-8?q?la.org/show=5Fbug.cgi=3Fid=3D673789?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@817 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/mac/handler/minidump_generator.cc | 17 ++++++++++++++++- src/client/mac/handler/minidump_generator.h | 6 ++++++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'src/client/mac') diff --git a/src/client/mac/handler/minidump_generator.cc b/src/client/mac/handler/minidump_generator.cc index 8d670429..087d4d70 100644 --- a/src/client/mac/handler/minidump_generator.cc +++ b/src/client/mac/handler/minidump_generator.cc @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -43,6 +42,11 @@ #include #include "client/mac/handler/minidump_generator.h" + +#ifdef HAS_PPC_SUPPORT +#include +#endif + #include "client/minidump_file_writer-inl.h" #include "common/mac/file_id.h" #include "common/mac/string_utilities.h" @@ -336,10 +340,12 @@ bool MinidumpGenerator::WriteStackFromStartAddress( bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location) { switch (cpu_type_) { +#ifdef HAS_PPC_SUUPORT case CPU_TYPE_POWERPC: return WriteStackPPC(state, stack_location); case CPU_TYPE_POWERPC64: return WriteStackPPC64(state, stack_location); +#endif case CPU_TYPE_I386: return WriteStackX86(state, stack_location); case CPU_TYPE_X86_64: @@ -352,10 +358,12 @@ bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state, bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state, MDLocationDescriptor *register_location) { switch (cpu_type_) { +#ifdef HAS_PPC_SUPPORT case CPU_TYPE_POWERPC: return WriteContextPPC(state, register_location); case CPU_TYPE_POWERPC64: return WriteContextPPC64(state, register_location); +#endif case CPU_TYPE_I386: return WriteContextX86(state, register_location); case CPU_TYPE_X86_64: @@ -368,10 +376,12 @@ bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state, u_int64_t MinidumpGenerator::CurrentPCForStack( breakpad_thread_state_data_t state) { switch (cpu_type_) { +#ifdef HAS_PPC_SUPPORT case CPU_TYPE_POWERPC: return CurrentPCForStackPPC(state); case CPU_TYPE_POWERPC64: return CurrentPCForStackPPC64(state); +#endif case CPU_TYPE_I386: return CurrentPCForStackX86(state); case CPU_TYPE_X86_64: @@ -382,6 +392,7 @@ u_int64_t MinidumpGenerator::CurrentPCForStack( } } +#ifdef HAS_PCC_SUPPORT bool MinidumpGenerator::WriteStackPPC(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location) { ppc_thread_state_t *machine_state = @@ -539,6 +550,8 @@ bool MinidumpGenerator::WriteContextPPC64( return true; } +#endif + bool MinidumpGenerator::WriteStackX86(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location) { i386_thread_state_t *machine_state = @@ -663,12 +676,14 @@ bool MinidumpGenerator::GetThreadState(thread_act_t target_thread, mach_msg_type_number_t *count) { thread_state_flavor_t flavor; switch (cpu_type_) { +#ifdef HAS_PPC_SUPPORT case CPU_TYPE_POWERPC: flavor = PPC_THREAD_STATE; break; case CPU_TYPE_POWERPC64: flavor = PPC_THREAD_STATE64; break; +#endif case CPU_TYPE_I386: flavor = i386_THREAD_STATE; break; diff --git a/src/client/mac/handler/minidump_generator.h b/src/client/mac/handler/minidump_generator.h index 224ad1c2..55c4c8a3 100644 --- a/src/client/mac/handler/minidump_generator.h +++ b/src/client/mac/handler/minidump_generator.h @@ -43,6 +43,10 @@ #include "dynamic_images.h" +#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7 + #define HAS_PPC_SUPPORT +#endif + namespace google_breakpad { using std::string; @@ -128,6 +132,7 @@ class MinidumpGenerator { int FindExecutableModule(); // Per-CPU implementations of these methods +#ifdef HAS_PPC_SUPPORT bool WriteStackPPC(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location); bool WriteContextPPC(breakpad_thread_state_data_t state, @@ -138,6 +143,7 @@ class MinidumpGenerator { bool WriteContextPPC64(breakpad_thread_state_data_t state, MDLocationDescriptor *register_location); u_int64_t CurrentPCForStackPPC64(breakpad_thread_state_data_t state); +#endif bool WriteStackX86(breakpad_thread_state_data_t state, MDMemoryDescriptor *stack_location); bool WriteContextX86(breakpad_thread_state_data_t state, -- cgit v1.2.1