aboutsummaryrefslogtreecommitdiff
path: root/src/client/mac/handler/minidump_generator.h
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-10-07 15:57:23 +0000
committerqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-10-07 15:57:23 +0000
commit9525fcd6338ac1697f26306216f579fa60cba657 (patch)
tree43b69333262270f3b4373c0e562206cb8c807430 /src/client/mac/handler/minidump_generator.h
parent10.4 SDK fix (diff)
downloadbreakpad-9525fcd6338ac1697f26306216f579fa60cba657.tar.xz
#ifdef cpu specific code.
Review URL: http://breakpad.appspot.com/307002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@848 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/mac/handler/minidump_generator.h')
-rw-r--r--src/client/mac/handler/minidump_generator.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/client/mac/handler/minidump_generator.h b/src/client/mac/handler/minidump_generator.h
index 6f9fe8f7..3ceb95be 100644
--- a/src/client/mac/handler/minidump_generator.h
+++ b/src/client/mac/handler/minidump_generator.h
@@ -33,6 +33,7 @@
#define CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__
#include <mach/mach.h>
+#include <TargetConditionals.h>
#include <string>
@@ -43,9 +44,14 @@
#include "dynamic_images.h"
-#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
+#if !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7)
#define HAS_PPC_SUPPORT
#endif
+#if defined(__arm__)
+ #define HAS_ARM_SUPPORT
+#elif defined(__i386__) || defined(__x86_64__)
+ #define HAS_X86_SUPPORT
+#endif
namespace google_breakpad {
@@ -53,7 +59,7 @@ using std::string;
// Use the REGISTER_FROM_THREADSTATE to access a register name from the
// breakpad_thread_state_t structure.
-#if __DARWIN_UNIX03 || TARGET_CPU_X86_64 || TARGET_CPU_PPC64
+#if __DARWIN_UNIX03 || TARGET_CPU_X86_64 || TARGET_CPU_PPC64 || TARGET_CPU_ARM
// In The 10.5 SDK Headers Apple prepended __ to the variable names in the
// i386_thread_state_t structure. There's no good way to tell what version of
// the SDK we're compiling against so we just toggle on the same preprocessor
@@ -129,6 +135,13 @@ class MinidumpGenerator {
int FindExecutableModule();
// Per-CPU implementations of these methods
+#ifdef HAS_ARM_SUPPORT
+ bool WriteStackARM(breakpad_thread_state_data_t state,
+ MDMemoryDescriptor *stack_location);
+ bool WriteContextARM(breakpad_thread_state_data_t state,
+ MDLocationDescriptor *register_location);
+ u_int64_t CurrentPCForStackARM(breakpad_thread_state_data_t state);
+#endif
#ifdef HAS_PPC_SUPPORT
bool WriteStackPPC(breakpad_thread_state_data_t state,
MDMemoryDescriptor *stack_location);
@@ -141,6 +154,7 @@ class MinidumpGenerator {
MDLocationDescriptor *register_location);
u_int64_t CurrentPCForStackPPC64(breakpad_thread_state_data_t state);
#endif
+#ifdef HAS_X86_SUPPORT
bool WriteStackX86(breakpad_thread_state_data_t state,
MDMemoryDescriptor *stack_location);
bool WriteContextX86(breakpad_thread_state_data_t state,
@@ -151,6 +165,7 @@ class MinidumpGenerator {
bool WriteContextX86_64(breakpad_thread_state_data_t state,
MDLocationDescriptor *register_location);
u_int64_t CurrentPCForStackX86_64(breakpad_thread_state_data_t state);
+#endif
// disallow copy ctor and operator=
explicit MinidumpGenerator(const MinidumpGenerator &);