Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: src/google_breakpad/common/minidump_format.h

Issue 2109063004: Updating MDRawMiscInfo to support version 5 of the MINIDUMP_MISC_INFO_N structure. Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/processor/minidump.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/google_breakpad/common/minidump_format.h
diff --git a/src/google_breakpad/common/minidump_format.h b/src/google_breakpad/common/minidump_format.h
index 645c56c529495e55dc2b3861408ad3d4d420bd4d..251e503df953dc2588d3ad5b9eef91c964ee929e 100644
--- a/src/google_breakpad/common/minidump_format.h
+++ b/src/google_breakpad/common/minidump_format.h
@@ -716,16 +716,51 @@ typedef struct {
/* The bias value to be used during local time translations that occur during
* daylight saving time. */
int32_t daylight_bias;
} MDTimeZoneInformation; /* TIME_ZONE_INFORMATION */
/* MAX_PATH from windef.h */
#define MD_MAX_PATH 260
+/* For MDXStateConfigFeatureMscInfo.features */
+typedef struct {
+ uint32_t offset;
+ uint32_t size;
+} MDXStateFeature;
+
+/* For MDXStateConfigFeatureMscInfo.enabled_features from winnt.h */
+typedef enum {
+ MD_XSTATE_LEGACY_FLOATING_POINT = 0, /* XSTATE_LEGACY_FLOATING_POINT */
+ MD_XSTATE_LEGACY_SSE = 1, /* XSTATE_LEGACY_SSE */
+ MD_XSTATE_GSSE = 2, /* XSTATE_GSSE */
+ MD_XSTATE_AVX = MD_XSTATE_GSSE, /* XSTATE_AVX */
+ MD_XSTATE_MPX_BNDREGS = 3, /* XSTATE_MPX_BNDREGS */
+ MD_XSTATE_MPX_BNDCSR = 4, /* XSTATE_MPX_BNDCSR */
+ MD_XSTATE_AVX512_KMASK = 5, /* XSTATE_AVX512_KMASK */
+ MD_XSTATE_AVX512_ZMM_H = 6, /* XSTATE_AVX512_ZMM_H */
+ MD_XSTATE_AVX512_ZMM = 7, /* XSTATE_AVX512_ZMM */
+ MD_XSTATE_IPT = 8, /* XSTATE_IPT */
+ MD_XSTATE_LWP = 62 /* XSTATE_LWP */
+} MDXStateFeatureFlag;
+
+/* MAXIMUM_XSTATE_FEATURES from winnt.h */
+#define MD_MAXIMUM_XSTATE_FEATURES 64
+
+/* For MDRawMiscInfo.xstate_data */
+typedef struct {
+ uint32_t size_of_info;
+ uint32_t context_size;
+ /* An entry in the features array is valid only if the corresponding bit in
+ * the enabled_features flag is set. */
+ uint64_t enabled_features;
+ MDXStateFeature features[MD_MAXIMUM_XSTATE_FEATURES];
+} MDXStateConfigFeatureMscInfo;
+
+
/* The miscellaneous information stream contains a variety
* of small pieces of information. A member is valid if
* it's within the available size and its corresponding
* bit is set. */
typedef struct {
uint32_t size_of_info; /* Length of entire MDRawMiscInfo structure. */
uint32_t flags1;
@@ -776,27 +811,47 @@ typedef struct {
* in MINIDUMP_MISC_INFO_4. When this struct is populated, these values
* may not be set. Use flags1 and size_of_info to determine whether these
* values are present. */
/* The following 2 fields are only valid if flags1 contains
* MD_MISCINFO_FLAGS1_BUILDSTRING. */
uint16_t build_string[MD_MAX_PATH]; /* UTF-16-encoded, 0-terminated */
uint16_t dbg_bld_str[40]; /* UTF-16-encoded, 0-terminated */
+
+ /* The following fields are not present in MINIDUMP_MISC_INFO_4 but are
+ * in MINIDUMP_MISC_INFO_5. When this struct is populated, these values
+ * may not be set. Use flags1 and size_of_info to determine whether these
+ * values are present. */
+
+ /* The following field has its own flags for establishing the validity of
+ * the structure's contents.*/
+ MDXStateConfigFeatureMscInfo xstate_data;
+
+ /* The following field is only valid if flags1 contains
+ * MD_MISCINFO_FLAGS1_PROCESS_COOKIE. */
+ uint32_t process_cookie;
} MDRawMiscInfo; /* MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO_2,
* MINIDUMP_MISC_INFO_3, MINIDUMP_MISC_INFO_4,
- * MINIDUMP_MISC_INFO_N */
+ * MINIDUMP_MISC_INFO_5, MINIDUMP_MISC_INFO_N */
static const size_t MD_MISCINFO_SIZE =
offsetof(MDRawMiscInfo, processor_max_mhz);
static const size_t MD_MISCINFO2_SIZE =
offsetof(MDRawMiscInfo, process_integrity_level);
static const size_t MD_MISCINFO3_SIZE =
offsetof(MDRawMiscInfo, build_string[0]);
-static const size_t MD_MISCINFO4_SIZE = sizeof(MDRawMiscInfo);
+static const size_t MD_MISCINFO4_SIZE =
+ offsetof(MDRawMiscInfo, xstate_data);
+/* Version 5 of the MDRawMiscInfo structure is not a multiple of 8 in size and
+ * yet it contains some 8-bytes sized fields. This causes many compilers to
+ * round the structure size up to a multiple of 8 by adding padding at the end.
+ * The following hack is thus required for matching the proper on-disk size. */
+static const size_t MD_MISCINFO5_SIZE =
+ offsetof(MDRawMiscInfo, process_cookie) + sizeof(uint32_t);
/* For (MDRawMiscInfo).flags1. These values indicate which fields in the
* MDRawMiscInfoStructure are valid. */
typedef enum {
MD_MISCINFO_FLAGS1_PROCESS_ID = 0x00000001,
/* MINIDUMP_MISC1_PROCESS_ID */
MD_MISCINFO_FLAGS1_PROCESS_TIMES = 0x00000002,
/* MINIDUMP_MISC1_PROCESS_TIMES */
@@ -807,16 +862,18 @@ typedef enum {
MD_MISCINFO_FLAGS1_PROCESS_EXECUTE_FLAGS = 0x00000020,
/* MINIDUMP_MISC3_PROCESS_EXECUTE_FLAGS */
MD_MISCINFO_FLAGS1_TIMEZONE = 0x00000040,
/* MINIDUMP_MISC3_TIMEZONE */
MD_MISCINFO_FLAGS1_PROTECTED_PROCESS = 0x00000080,
/* MINIDUMP_MISC3_PROTECTED_PROCESS */
MD_MISCINFO_FLAGS1_BUILDSTRING = 0x00000100,
/* MINIDUMP_MISC4_BUILDSTRING */
+ MD_MISCINFO_FLAGS1_PROCESS_COOKIE = 0x00000200,
+ /* MINIDUMP_MISC5_PROCESS_COOKIE */
} MDMiscInfoFlags1;
/*
* Around DbgHelp version 6.0, the style of new LIST structures changed
* from including an array of length 1 at the end of the struct to
* represent the variable-length data to including explicit
* "size of header", "size of entry" and "number of entries" fields
* in the header, presumably to allow backwards-compatibly-extending
« no previous file with comments | « no previous file | src/processor/minidump.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698