aboutsummaryrefslogtreecommitdiff
path: root/src/common/mac/macho_reader.cc
diff options
context:
space:
mode:
authorqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-10-12 13:49:03 +0000
committerqsr@chromium.org <qsr@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-10-12 13:49:03 +0000
commite694156d728975ae3552878d85a79606e2616023 (patch)
tree0adf3c84ea767d80f18d3287e276538c49a1a098 /src/common/mac/macho_reader.cc
parentMinor formatting fix following r865. (diff)
downloadbreakpad-e694156d728975ae3552878d85a79606e2616023.tar.xz
Handling reading arm executable.
Because CPU_TYPE_ARM is not defined on Mac OSX 10.4, I have to redefine the variable to the correct value. Review URL: http://breakpad.appspot.com/310004 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@867 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/mac/macho_reader.cc')
-rw-r--r--src/common/mac/macho_reader.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/mac/macho_reader.cc b/src/common/mac/macho_reader.cc
index ff16bc61..f1f0a179 100644
--- a/src/common/mac/macho_reader.cc
+++ b/src/common/mac/macho_reader.cc
@@ -38,6 +38,11 @@
#include <stdio.h>
#include <stdlib.h>
+// Unfortunately, CPU_TYPE_ARM is not define for 10.4.
+#if !defined(CPU_TYPE_ARM)
+#define CPU_TYPE_ARM 12
+#endif
+
namespace google_breakpad {
namespace mach_o {
@@ -230,6 +235,7 @@ bool Reader::Read(const uint8_t *buffer,
uint32_t expected_magic;
// validate that magic matches the expected cpu type
switch (expected_cpu_type) {
+ case CPU_TYPE_ARM:
case CPU_TYPE_I386:
expected_magic = MH_CIGAM;
break;