From 808ff9bc70e2a7fe8d2b360669a6fd3af4f60e0f Mon Sep 17 00:00:00 2001 From: mmentovai Date: Wed, 14 May 2008 18:24:23 +0000 Subject: 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 --- src/google_breakpad/common/minidump_cpu_ppc.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/google_breakpad/common/minidump_cpu_ppc.h') 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 -- cgit v1.2.1