Index: minidump/minidump_extensions.h |
diff --git a/minidump/minidump_extensions.h b/minidump/minidump_extensions.h |
index a82d2f96562e522e5f42121ab7951b19d6cd3425..5230f85f6b2f0c32e73d33ee35d1d2b8f2144ca8 100644 |
--- a/minidump/minidump_extensions.h |
+++ b/minidump/minidump_extensions.h |
@@ -15,10 +15,11 @@ |
#ifndef CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ |
#define CRASHPAD_MINIDUMP_MINIDUMP_EXTENSIONS_H_ |
-#include <dbghelp.h> |
#include <stdint.h> |
-#include <winnt.h> |
+#include "minidump/crashpad_dbghelp.h" |
+#include "minidump/crashpad_winnt.h" |
scottmg
2015/02/02 23:16:37
Sadly, winnt.h has the same affliction as dbghelp.
|
+#include "util/misc/struct_pack.h" |
#include "util/misc/uuid.h" |
namespace crashpad { |
@@ -69,7 +70,7 @@ enum MinidumpStreamType : uint32_t { |
//! file. |
//! |
//! \sa MINIDUMP_STRING |
-struct __attribute__((packed, aligned(4))) MinidumpUTF8String { |
+PACK_AND_ALIGN_4(struct MinidumpUTF8String { |
// The field names do not conform to typical style, they match the names used |
// in MINIDUMP_STRING. This makes it easier to operate on MINIDUMP_STRING (for |
// UTF-16 strings) and MinidumpUTF8String using templates. |
@@ -83,7 +84,7 @@ struct __attribute__((packed, aligned(4))) MinidumpUTF8String { |
//! \brief The string, encoded in UTF-8, and terminated with a `NUL` byte. |
uint8_t Buffer[0]; |
-}; |
+}); |
//! \brief CPU type values for MINIDUMP_SYSTEM_INFO::ProcessorArchitecture. |
//! |
@@ -297,25 +298,25 @@ struct MinidumpModuleCodeViewRecordPDB70 { |
}; |
//! \brief A list of ::RVA pointers. |
-struct __attribute__((packed, aligned(4))) MinidumpRVAList { |
+PACK_AND_ALIGN_4(struct MinidumpRVAList { |
//! \brief The number of children present in the #children array. |
uint32_t count; |
//! \brief Pointers to other structures in the minidump file. |
RVA children[0]; |
-}; |
+}); |
//! \brief A list of MINIDUMP_LOCATION_DESCRIPTOR objects. |
-struct __attribute__((packed, aligned(4))) MinidumpLocationDescriptorList { |
+PACK_AND_ALIGN_4(struct MinidumpLocationDescriptorList { |
//! \brief The number of children present in the #children array. |
uint32_t count; |
//! \brief Pointers to other structures in the minidump file. |
MINIDUMP_LOCATION_DESCRIPTOR children[0]; |
-}; |
+}); |
//! \brief A key-value pair. |
-struct __attribute__((packed, aligned(4))) MinidumpSimpleStringDictionaryEntry { |
+PACK_AND_ALIGN_4(struct MinidumpSimpleStringDictionaryEntry { |
//! \brief ::RVA of a MinidumpUTF8String containing the key of a key-value |
//! pair. |
RVA key; |
@@ -323,16 +324,16 @@ struct __attribute__((packed, aligned(4))) MinidumpSimpleStringDictionaryEntry { |
//! \brief ::RVA of a MinidumpUTF8String containing the value of a key-value |
//! pair. |
RVA value; |
-}; |
+}); |
//! \brief A list of key-value pairs. |
-struct __attribute__((packed, aligned(4))) MinidumpSimpleStringDictionary { |
+PACK_AND_ALIGN_4(struct MinidumpSimpleStringDictionary { |
//! \brief The number of key-value pairs present. |
uint32_t count; |
//! \brief A list of MinidumpSimpleStringDictionaryEntry entries. |
MinidumpSimpleStringDictionaryEntry entries[0]; |
-}; |
+}); |
//! \brief Additional Crashpad-specific information about a module carried |
//! within a minidump file. |
@@ -349,7 +350,7 @@ struct __attribute__((packed, aligned(4))) MinidumpSimpleStringDictionary { |
//! fields are valid or not. |
//! |
//! \sa #MinidumpModuleCrashpadInfoList |
-struct __attribute__((packed, aligned(4))) MinidumpModuleCrashpadInfo { |
+PACK_AND_ALIGN_4(struct MinidumpModuleCrashpadInfo { |
//! \brief The structure’s currently-defined version number. |
//! |
//! \sa version |
@@ -392,7 +393,7 @@ struct __attribute__((packed, aligned(4))) MinidumpModuleCrashpadInfo { |
//! |
//! This field is present when #version is at least `1`. |
MINIDUMP_LOCATION_DESCRIPTOR simple_annotations; |
-}; |
+}); |
//! \brief Additional Crashpad-specific information about modules carried within |
//! a minidump file. |
@@ -422,7 +423,7 @@ using MinidumpModuleCrashpadInfoList = MinidumpLocationDescriptorList; |
//! structure. Revise #kVersion and document each field’s validity based on |
//! #version, so that newer parsers will be able to determine whether the added |
//! fields are valid or not. |
-struct __attribute__((packed, aligned(4))) MinidumpCrashpadInfo { |
+PACK_AND_ALIGN_4(struct MinidumpCrashpadInfo { |
//! \brief The structure’s currently-defined version number. |
//! |
//! \sa version |
@@ -443,7 +444,7 @@ struct __attribute__((packed, aligned(4))) MinidumpCrashpadInfo { |
//! |
//! This field is present when #version is at least `1`. |
MINIDUMP_LOCATION_DESCRIPTOR module_list; |
-}; |
+}); |
} // namespace crashpad |