aboutsummaryrefslogtreecommitdiff
path: root/src/google_breakpad/common/minidump_format.h
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-08-30 22:22:08 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-08-30 22:22:08 +0000
commit1a1890a52aaf8bfbea34a8d918423e6c81f3ea80 (patch)
tree24e84b122a562af38ebb1ce28ed0d71046bc7439 /src/google_breakpad/common/minidump_format.h
parentissue 243 - Linux dumper should use build id produced by ld --build-id if ava... (diff)
downloadbreakpad-1a1890a52aaf8bfbea34a8d918423e6c81f3ea80.tar.xz
Adjust MD_CONTEXT_CPU_MASK to reflect reality, fix some code so it can handle dumps using the old value for MD_CONTEXT_ARM
The value of MD_CONTEXT_CPU_MASK in use assumes that only the lower 6 bits are used for flags, and the upper 26 bits are for the CPU type. However, as of Windows 7 SP1, the 7th bit is being used as a flag (per http://msdn.microsoft.com/en-us/library/hh134238%28v=vs.85%29.aspx and the Windows SDK headers). Adjusting MD_CONTEXT_CPU_MASK works, but unfortunately that masks off the existing value of MD_CONTEXT_ARM. This patch also changes the value of MD_CONTEXT_ARM and adjusts the minidump context reading machinery to gracefully handle minidumps with the old value. R=mark at http://breakpad.appspot.com/302001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@831 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/google_breakpad/common/minidump_format.h')
-rw-r--r--src/google_breakpad/common/minidump_format.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/google_breakpad/common/minidump_format.h b/src/google_breakpad/common/minidump_format.h
index 77f28ca7..6c051305 100644
--- a/src/google_breakpad/common/minidump_format.h
+++ b/src/google_breakpad/common/minidump_format.h
@@ -90,19 +90,20 @@ typedef struct {
* WinNT.h
*/
-/* Non-x86 CPU identifiers found in the high 26 bits of
+/* Non-x86 CPU identifiers found in the high 24 bits of
* (MDRawContext*).context_flags. These aren't used by Breakpad, but are
* defined here for reference, to avoid assigning values that conflict
* (although some values already conflict). */
#define MD_CONTEXT_IA64 0x00080000 /* CONTEXT_IA64 */
-#define MD_CONTEXT_AMD64 0x00100000 /* CONTEXT_AMD64 */
/* Additional values from winnt.h in the Windows CE 5.0 SDK: */
#define MD_CONTEXT_SHX 0x000000c0 /* CONTEXT_SH4 (Super-H, includes SH3) */
-#define MD_CONTEXT_ARM 0x00000040 /* CONTEXT_ARM (0x40 bit set in SHx?) */
#define MD_CONTEXT_MIPS 0x00010000 /* CONTEXT_R4000 (same value as x86?) */
#define MD_CONTEXT_ALPHA 0x00020000 /* CONTEXT_ALPHA */
-#define MD_CONTEXT_CPU_MASK 0xffffffc0
+/* As of Windows 7 SP1, the number of flag bits has increased to
+ * include 0x40 (CONTEXT_XSTATE):
+ * http://msdn.microsoft.com/en-us/library/hh134238%28v=vs.85%29.aspx */
+#define MD_CONTEXT_CPU_MASK 0xffffff00
/* This is a base type for MDRawContextX86 and MDRawContextPPC. This