aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-05-14 18:24:23 +0000
committermmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2008-05-14 18:24:23 +0000
commit808ff9bc70e2a7fe8d2b360669a6fd3af4f60e0f (patch)
tree9403a8cf34a4ce52446f2c2bdecf003a4474fdd5
parentFix to stop unit tests from being compiled & run for non-native architectures (diff)
downloadbreakpad-808ff9bc70e2a7fe8d2b360669a6fd3af4f60e0f.tar.xz
64-bit processor can't handle 32-bit ppc minidumps due to struct padding
differences on 64- and 32-bit CPUs. Force 32-bit alignment rules for 32-bit ppc context struct. r=nealsid http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/21a8e99c4800b51d git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@273 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r--src/google_breakpad/common/minidump_cpu_ppc.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/google_breakpad/common/minidump_cpu_ppc.h b/src/google_breakpad/common/minidump_cpu_ppc.h
index 68775ce3..40a64931 100644
--- a/src/google_breakpad/common/minidump_cpu_ppc.h
+++ b/src/google_breakpad/common/minidump_cpu_ppc.h
@@ -104,6 +104,11 @@ typedef struct {
#define MD_CONTEXT_PPC_GPR_COUNT 32
+/* Use the same 32-bit alignment when accessing this structure from 64-bit code
+ * as is used natively in 32-bit code. #pragma pack is a MSVC extension
+ * supported by gcc. */
+#pragma pack(push, 4)
+
typedef struct {
/* context_flags is not present in ppc_thread_state, but it aids
* identification of MDRawContextPPC among other raw context types,
@@ -131,6 +136,8 @@ typedef struct {
MDVectorSaveAreaPPC vector_save;
} MDRawContextPPC; /* Based on ppc_thread_state */
+#pragma pack(pop)
+
/* For (MDRawContextPPC).context_flags. These values indicate the type of
* context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its
* value was chosen to avoid likely conflicts with MD_CONTEXT_* for other