aboutsummaryrefslogtreecommitdiff
path: root/src/google_breakpad/common
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-03-06 14:04:42 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-03-06 14:04:42 +0000
commitaeffe1056f9ff6526d87a16ef55222899f5528f7 (patch)
tree1b7601a9135f82c14e73535c9d4a24f94d494662 /src/google_breakpad/common
parentWork around Windows headers #defining ERROR by renaming enum values in StackF... (diff)
downloadbreakpad-aeffe1056f9ff6526d87a16ef55222899f5528f7.tar.xz
Use stdint types everywhere
R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/google_breakpad/common')
-rw-r--r--src/google_breakpad/common/breakpad_types.h36
-rw-r--r--src/google_breakpad/common/minidump_cpu_amd64.h164
-rw-r--r--src/google_breakpad/common/minidump_cpu_arm.h14
-rw-r--r--src/google_breakpad/common/minidump_cpu_ppc.h38
-rw-r--r--src/google_breakpad/common/minidump_cpu_ppc64.h18
-rw-r--r--src/google_breakpad/common/minidump_cpu_sparc.h24
-rw-r--r--src/google_breakpad/common/minidump_cpu_x86.h66
-rw-r--r--src/google_breakpad/common/minidump_format.h246
8 files changed, 304 insertions, 302 deletions
diff --git a/src/google_breakpad/common/breakpad_types.h b/src/google_breakpad/common/breakpad_types.h
index 926b47f2..a6545be5 100644
--- a/src/google_breakpad/common/breakpad_types.h
+++ b/src/google_breakpad/common/breakpad_types.h
@@ -31,7 +31,7 @@
*
* (This is C99 source, please don't corrupt it with C++.)
*
- * This file ensures that types u_intN_t are defined for N = 8, 16, 32, and
+ * This file ensures that types uintN_t are defined for N = 8, 16, 32, and
* 64. Types of precise widths are crucial to the task of writing data
* structures on one platform and reading them on another.
*
@@ -42,36 +42,38 @@
#ifndef _WIN32
-#include <sys/types.h>
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS
#endif /* __STDC_FORMAT_MACROS */
#include <inttypes.h>
-#if defined(__SUNPRO_CC) || (defined(__GNUC__) && defined(__sun__))
-typedef uint8_t u_int8_t;
-typedef uint16_t u_int16_t;
-typedef uint32_t u_int32_t;
-typedef uint64_t u_int64_t;
-#endif
-
#else /* !_WIN32 */
+#if _MSC_VER >= 1600
+#include <stdint.h>
+#elif defined(BREAKPAD_CUSTOM_STDINT_H)
+/* Visual C++ Pre-2010 did not ship a stdint.h, so allow
+ * consumers of this library to provide their own because
+ * there are often subtle type incompatibilities.
+ */
+#include BREAKPAD_CUSTOM_STDINT_H
+#else
#include <WTypes.h>
-typedef unsigned __int8 u_int8_t;
-typedef unsigned __int16 u_int16_t;
-typedef unsigned __int32 u_int32_t;
-typedef unsigned __int64 u_int64_t;
+typedef unsigned __int8 uint8_t;
+typedef unsigned __int16 uint16_t;
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+#endif
#endif /* !_WIN32 */
typedef struct {
- u_int64_t high;
- u_int64_t low;
-} u_int128_t;
+ uint64_t high;
+ uint64_t low;
+} uint128_struct;
-typedef u_int64_t breakpad_time_t;
+typedef uint64_t breakpad_time_t;
/* Try to get PRIx64 from inttypes.h, but if it's not defined, fall back to
* llx, which is the format string for "long long" - this is a 64-bit
diff --git a/src/google_breakpad/common/minidump_cpu_amd64.h b/src/google_breakpad/common/minidump_cpu_amd64.h
index fa6a9961..4256706d 100644
--- a/src/google_breakpad/common/minidump_cpu_amd64.h
+++ b/src/google_breakpad/common/minidump_cpu_amd64.h
@@ -67,7 +67,7 @@
* equivalent types and values in the Windows Platform SDK are given in
* comments.
*
- * Author: Mark Mentovai
+ * Author: Mark Mentovai
* Change to split into its own file: Neal Sidhwaney */
#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__
@@ -79,22 +79,22 @@
*/
typedef struct {
- u_int16_t control_word;
- u_int16_t status_word;
- u_int8_t tag_word;
- u_int8_t reserved1;
- u_int16_t error_opcode;
- u_int32_t error_offset;
- u_int16_t error_selector;
- u_int16_t reserved2;
- u_int32_t data_offset;
- u_int16_t data_selector;
- u_int16_t reserved3;
- u_int32_t mx_csr;
- u_int32_t mx_csr_mask;
- u_int128_t float_registers[8];
- u_int128_t xmm_registers[16];
- u_int8_t reserved4[96];
+ uint16_t control_word;
+ uint16_t status_word;
+ uint8_t tag_word;
+ uint8_t reserved1;
+ uint16_t error_opcode;
+ uint32_t error_offset;
+ uint16_t error_selector;
+ uint16_t reserved2;
+ uint32_t data_offset;
+ uint16_t data_selector;
+ uint16_t reserved3;
+ uint32_t mx_csr;
+ uint32_t mx_csr_mask;
+ uint128_struct float_registers[8];
+ uint128_struct xmm_registers[16];
+ uint8_t reserved4[96];
} MDXmmSaveArea32AMD64; /* XMM_SAVE_AREA32 */
#define MD_CONTEXT_AMD64_VR_COUNT 26
@@ -103,63 +103,63 @@ typedef struct {
/*
* Register parameter home addresses.
*/
- u_int64_t p1_home;
- u_int64_t p2_home;
- u_int64_t p3_home;
- u_int64_t p4_home;
- u_int64_t p5_home;
- u_int64_t p6_home;
+ uint64_t p1_home;
+ uint64_t p2_home;
+ uint64_t p3_home;
+ uint64_t p4_home;
+ uint64_t p5_home;
+ uint64_t p6_home;
/* The next field determines the layout of the structure, and which parts
* of it are populated */
- u_int32_t context_flags;
- u_int32_t mx_csr;
+ uint32_t context_flags;
+ uint32_t mx_csr;
/* The next register is included with MD_CONTEXT_AMD64_CONTROL */
- u_int16_t cs;
+ uint16_t cs;
/* The next 4 registers are included with MD_CONTEXT_AMD64_SEGMENTS */
- u_int16_t ds;
- u_int16_t es;
- u_int16_t fs;
- u_int16_t gs;
+ uint16_t ds;
+ uint16_t es;
+ uint16_t fs;
+ uint16_t gs;
/* The next 2 registers are included with MD_CONTEXT_AMD64_CONTROL */
- u_int16_t ss;
- u_int32_t eflags;
-
+ uint16_t ss;
+ uint32_t eflags;
+
/* The next 6 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */
- u_int64_t dr0;
- u_int64_t dr1;
- u_int64_t dr2;
- u_int64_t dr3;
- u_int64_t dr6;
- u_int64_t dr7;
+ uint64_t dr0;
+ uint64_t dr1;
+ uint64_t dr2;
+ uint64_t dr3;
+ uint64_t dr6;
+ uint64_t dr7;
/* The next 4 registers are included with MD_CONTEXT_AMD64_INTEGER */
- u_int64_t rax;
- u_int64_t rcx;
- u_int64_t rdx;
- u_int64_t rbx;
+ uint64_t rax;
+ uint64_t rcx;
+ uint64_t rdx;
+ uint64_t rbx;
/* The next register is included with MD_CONTEXT_AMD64_CONTROL */
- u_int64_t rsp;
+ uint64_t rsp;
/* The next 11 registers are included with MD_CONTEXT_AMD64_INTEGER */
- u_int64_t rbp;
- u_int64_t rsi;
- u_int64_t rdi;
- u_int64_t r8;
- u_int64_t r9;
- u_int64_t r10;
- u_int64_t r11;
- u_int64_t r12;
- u_int64_t r13;
- u_int64_t r14;
- u_int64_t r15;
+ uint64_t rbp;
+ uint64_t rsi;
+ uint64_t rdi;
+ uint64_t r8;
+ uint64_t r9;
+ uint64_t r10;
+ uint64_t r11;
+ uint64_t r12;
+ uint64_t r13;
+ uint64_t r14;
+ uint64_t r15;
/* The next register is included with MD_CONTEXT_AMD64_CONTROL */
- u_int64_t rip;
+ uint64_t rip;
/* The next set of registers are included with
* MD_CONTEXT_AMD64_FLOATING_POINT
@@ -167,37 +167,37 @@ typedef struct {
union {
MDXmmSaveArea32AMD64 flt_save;
struct {
- u_int128_t header[2];
- u_int128_t legacy[8];
- u_int128_t xmm0;
- u_int128_t xmm1;
- u_int128_t xmm2;
- u_int128_t xmm3;
- u_int128_t xmm4;
- u_int128_t xmm5;
- u_int128_t xmm6;
- u_int128_t xmm7;
- u_int128_t xmm8;
- u_int128_t xmm9;
- u_int128_t xmm10;
- u_int128_t xmm11;
- u_int128_t xmm12;
- u_int128_t xmm13;
- u_int128_t xmm14;
- u_int128_t xmm15;
+ uint128_struct header[2];
+ uint128_struct legacy[8];
+ uint128_struct xmm0;
+ uint128_struct xmm1;
+ uint128_struct xmm2;
+ uint128_struct xmm3;
+ uint128_struct xmm4;
+ uint128_struct xmm5;
+ uint128_struct xmm6;
+ uint128_struct xmm7;
+ uint128_struct xmm8;
+ uint128_struct xmm9;
+ uint128_struct xmm10;
+ uint128_struct xmm11;
+ uint128_struct xmm12;
+ uint128_struct xmm13;
+ uint128_struct xmm14;
+ uint128_struct xmm15;
} sse_registers;
};
- u_int128_t vector_register[MD_CONTEXT_AMD64_VR_COUNT];
- u_int64_t vector_control;
+ uint128_struct vector_register[MD_CONTEXT_AMD64_VR_COUNT];
+ uint64_t vector_control;
/* The next 5 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */
- u_int64_t debug_control;
- u_int64_t last_branch_to_rip;
- u_int64_t last_branch_from_rip;
- u_int64_t last_exception_to_rip;
- u_int64_t last_exception_from_rip;
-
+ uint64_t debug_control;
+ uint64_t last_branch_to_rip;
+ uint64_t last_branch_from_rip;
+ uint64_t last_exception_to_rip;
+ uint64_t last_exception_from_rip;
+
} MDRawContextAMD64; /* CONTEXT */
/* For (MDRawContextAMD64).context_flags. These values indicate the type of
diff --git a/src/google_breakpad/common/minidump_cpu_arm.h b/src/google_breakpad/common/minidump_cpu_arm.h
index dd071293..6a711383 100644
--- a/src/google_breakpad/common/minidump_cpu_arm.h
+++ b/src/google_breakpad/common/minidump_cpu_arm.h
@@ -77,13 +77,13 @@
* are not exactly minidumps.
*/
typedef struct {
- u_int64_t fpscr; /* FPU status register */
+ uint64_t fpscr; /* FPU status register */
/* 32 64-bit floating point registers, d0 .. d31. */
- u_int64_t regs[MD_FLOATINGSAVEAREA_ARM_FPR_COUNT];
+ uint64_t regs[MD_FLOATINGSAVEAREA_ARM_FPR_COUNT];
/* Miscellaneous control words */
- u_int32_t extra[MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT];
+ uint32_t extra[MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT];
} MDFloatingSaveAreaARM;
#define MD_CONTEXT_ARM_GPR_COUNT 16
@@ -92,7 +92,7 @@ typedef struct {
/* The next field determines the layout of the structure, and which parts
* of it are populated
*/
- u_int32_t context_flags;
+ uint32_t context_flags;
/* 16 32-bit integer registers, r0 .. r15
* Note the following fixed uses:
@@ -100,7 +100,7 @@ typedef struct {
* r14 is the link register
* r15 is the program counter
*/
- u_int32_t iregs[MD_CONTEXT_ARM_GPR_COUNT];
+ uint32_t iregs[MD_CONTEXT_ARM_GPR_COUNT];
/* CPSR (flags, basically): 32 bits:
bit 31 - N (negative)
@@ -109,14 +109,14 @@ typedef struct {
bit 28 - V (overflow)
bit 27 - Q (saturation flag, sticky)
All other fields -- ignore */
- u_int32_t cpsr;
+ uint32_t cpsr;
/* The next field is included with MD_CONTEXT_ARM_FLOATING_POINT */
MDFloatingSaveAreaARM float_save;
} MDRawContextARM;
-/* Indices into iregs for registers with a dedicated or conventional
+/* Indices into iregs for registers with a dedicated or conventional
* purpose.
*/
enum MDARMRegisterNumbers {
diff --git a/src/google_breakpad/common/minidump_cpu_ppc.h b/src/google_breakpad/common/minidump_cpu_ppc.h
index 038e921a..02ac3220 100644
--- a/src/google_breakpad/common/minidump_cpu_ppc.h
+++ b/src/google_breakpad/common/minidump_cpu_ppc.h
@@ -81,11 +81,11 @@
#define MD_FLOATINGSAVEAREA_PPC_FPR_COUNT 32
typedef struct {
- /* fpregs is a double[32] in mach/ppc/_types.h, but a u_int64_t is used
+ /* fpregs is a double[32] in mach/ppc/_types.h, but a uint64_t is used
* here for precise sizing. */
- u_int64_t fpregs[MD_FLOATINGSAVEAREA_PPC_FPR_COUNT];
- u_int32_t fpscr_pad;
- u_int32_t fpscr; /* Status/control */
+ uint64_t fpregs[MD_FLOATINGSAVEAREA_PPC_FPR_COUNT];
+ uint32_t fpscr_pad;
+ uint32_t fpscr; /* Status/control */
} MDFloatingSaveAreaPPC; /* Based on ppc_float_state */
@@ -94,11 +94,11 @@ typedef struct {
typedef struct {
/* Vector registers (including vscr) are 128 bits, but mach/ppc/_types.h
* exposes them as four 32-bit quantities. */
- u_int128_t save_vr[MD_VECTORSAVEAREA_PPC_VR_COUNT];
- u_int128_t save_vscr; /* Status/control */
- u_int32_t save_pad5[4];
- u_int32_t save_vrvalid; /* Identifies which vector registers are saved */
- u_int32_t save_pad6[7];
+ uint128_struct save_vr[MD_VECTORSAVEAREA_PPC_VR_COUNT];
+ uint128_struct save_vscr; /* Status/control */
+ uint32_t save_pad5[4];
+ uint32_t save_vrvalid; /* Indicates which vector registers are saved */
+ uint32_t save_pad6[7];
} MDVectorSaveAreaPPC; /* ppc_vector_state */
@@ -117,21 +117,21 @@ typedef struct {
/* context_flags is not present in ppc_thread_state, but it aids
* identification of MDRawContextPPC among other raw context types,
* and it guarantees alignment when we get to float_save. */
- u_int32_t context_flags;
+ uint32_t context_flags;
- u_int32_t srr0; /* Machine status save/restore: stores pc
+ uint32_t srr0; /* Machine status save/restore: stores pc
* (instruction) */
- u_int32_t srr1; /* Machine status save/restore: stores msr
+ uint32_t srr1; /* Machine status save/restore: stores msr
* (ps, program/machine state) */
/* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is
* used for brevity. */
- u_int32_t gpr[MD_CONTEXT_PPC_GPR_COUNT];
- u_int32_t cr; /* Condition */
- u_int32_t xer; /* Integer (fiXed-point) exception */
- u_int32_t lr; /* Link */
- u_int32_t ctr; /* Count */
- u_int32_t mq; /* Multiply/Quotient (PPC 601, POWER only) */
- u_int32_t vrsave; /* Vector save */
+ uint32_t gpr[MD_CONTEXT_PPC_GPR_COUNT];
+ uint32_t cr; /* Condition */
+ uint32_t xer; /* Integer (fiXed-point) exception */
+ uint32_t lr; /* Link */
+ uint32_t ctr; /* Count */
+ uint32_t mq; /* Multiply/Quotient (PPC 601, POWER only) */
+ uint32_t vrsave; /* Vector save */
/* float_save and vector_save aren't present in ppc_thread_state, but
* are represented in separate structures that still define a thread's
diff --git a/src/google_breakpad/common/minidump_cpu_ppc64.h b/src/google_breakpad/common/minidump_cpu_ppc64.h
index a788e5d1..da4f8723 100644
--- a/src/google_breakpad/common/minidump_cpu_ppc64.h
+++ b/src/google_breakpad/common/minidump_cpu_ppc64.h
@@ -90,20 +90,20 @@ typedef struct {
/* context_flags is not present in ppc_thread_state, but it aids
* identification of MDRawContextPPC among other raw context types,
* and it guarantees alignment when we get to float_save. */
- u_int64_t context_flags;
+ uint64_t context_flags;
- u_int64_t srr0; /* Machine status save/restore: stores pc
+ uint64_t srr0; /* Machine status save/restore: stores pc
* (instruction) */
- u_int64_t srr1; /* Machine status save/restore: stores msr
+ uint64_t srr1; /* Machine status save/restore: stores msr
* (ps, program/machine state) */
/* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is
* used for brevity. */
- u_int64_t gpr[MD_CONTEXT_PPC64_GPR_COUNT];
- u_int64_t cr; /* Condition */
- u_int64_t xer; /* Integer (fiXed-point) exception */
- u_int64_t lr; /* Link */
- u_int64_t ctr; /* Count */
- u_int64_t vrsave; /* Vector save */
+ uint64_t gpr[MD_CONTEXT_PPC64_GPR_COUNT];
+ uint64_t cr; /* Condition */
+ uint64_t xer; /* Integer (fiXed-point) exception */
+ uint64_t lr; /* Link */
+ uint64_t ctr; /* Count */
+ uint64_t vrsave; /* Vector save */
/* float_save and vector_save aren't present in ppc_thread_state, but
* are represented in separate structures that still define a thread's
diff --git a/src/google_breakpad/common/minidump_cpu_sparc.h b/src/google_breakpad/common/minidump_cpu_sparc.h
index ee95b64e..ddc4c759 100644
--- a/src/google_breakpad/common/minidump_cpu_sparc.h
+++ b/src/google_breakpad/common/minidump_cpu_sparc.h
@@ -82,10 +82,10 @@
typedef struct {
/* FPU floating point regs */
- u_int64_t regs[MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT];
+ uint64_t regs[MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT];
- u_int64_t filler;
- u_int64_t fsr; /* FPU status register */
+ uint64_t filler;
+ uint64_t fsr; /* FPU status register */
} MDFloatingSaveAreaSPARC; /* FLOATING_SAVE_AREA */
#define MD_CONTEXT_SPARC_GPR_COUNT 32
@@ -94,8 +94,8 @@ typedef struct {
/* The next field determines the layout of the structure, and which parts
* of it are populated
*/
- u_int32_t context_flags;
- u_int32_t flag_pad;
+ uint32_t context_flags;
+ uint32_t flag_pad;
/*
* General register access (SPARC).
* Don't confuse definitions here with definitions in <sys/regset.h>.
@@ -110,28 +110,28 @@ typedef struct {
* g_r[16-23] local registers(l0-l7)
* g_r[24-31] in registers(i0-i7)
*/
- u_int64_t g_r[MD_CONTEXT_SPARC_GPR_COUNT];
+ uint64_t g_r[MD_CONTEXT_SPARC_GPR_COUNT];
/* several control registers */
/* Processor State register(PSR) for SPARC V7/V8
* Condition Code register (CCR) for SPARC V9
*/
- u_int64_t ccr;
+ uint64_t ccr;
- u_int64_t pc; /* Program Counter register (PC) */
- u_int64_t npc; /* Next Program Counter register (nPC) */
- u_int64_t y; /* Y register (Y) */
+ uint64_t pc; /* Program Counter register (PC) */
+ uint64_t npc; /* Next Program Counter register (nPC) */
+ uint64_t y; /* Y register (Y) */
/* Address Space Identifier register (ASI) for SPARC V9
* WIM for SPARC V7/V8
*/
- u_int64_t asi;
+ uint64_t asi;
/* Floating-Point Registers State register (FPRS) for SPARC V9
* TBR for for SPARC V7/V8
*/
- u_int64_t fprs;
+ uint64_t fprs;
/* The next field is included with MD_CONTEXT_SPARC_FLOATING_POINT */
MDFloatingSaveAreaSPARC float_save;
diff --git a/src/google_breakpad/common/minidump_cpu_x86.h b/src/google_breakpad/common/minidump_cpu_x86.h
index 32aff8a7..e09cb7cb 100644
--- a/src/google_breakpad/common/minidump_cpu_x86.h
+++ b/src/google_breakpad/common/minidump_cpu_x86.h
@@ -76,18 +76,18 @@
/* SIZE_OF_80387_REGISTERS */
typedef struct {
- u_int32_t control_word;
- u_int32_t status_word;
- u_int32_t tag_word;
- u_int32_t error_offset;
- u_int32_t error_selector;
- u_int32_t data_offset;
- u_int32_t data_selector;
+ uint32_t control_word;
+ uint32_t status_word;
+ uint32_t tag_word;
+ uint32_t error_offset;
+ uint32_t error_selector;
+ uint32_t data_offset;
+ uint32_t data_selector;
/* register_area contains eight 80-bit (x87 "long double") quantities for
* floating-point registers %st0 (%mm0) through %st7 (%mm7). */
- u_int8_t register_area[MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE];
- u_int32_t cr0_npx_state;
+ uint8_t register_area[MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE];
+ uint32_t cr0_npx_state;
} MDFloatingSaveAreaX86; /* FLOATING_SAVE_AREA */
@@ -97,46 +97,46 @@ typedef struct {
typedef struct {
/* The next field determines the layout of the structure, and which parts
* of it are populated */
- u_int32_t context_flags;
+ uint32_t context_flags;
/* The next 6 registers are included with MD_CONTEXT_X86_DEBUG_REGISTERS */
- u_int32_t dr0;
- u_int32_t dr1;
- u_int32_t dr2;
- u_int32_t dr3;
- u_int32_t dr6;
- u_int32_t dr7;
+ uint32_t dr0;
+ uint32_t dr1;
+ uint32_t dr2;
+ uint32_t dr3;
+ uint32_t dr6;
+ uint32_t dr7;
/* The next field is included with MD_CONTEXT_X86_FLOATING_POINT */
MDFloatingSaveAreaX86 float_save;
/* The next 4 registers are included with MD_CONTEXT_X86_SEGMENTS */
- u_int32_t gs;
- u_int32_t fs;
- u_int32_t es;
- u_int32_t ds;
+ uint32_t gs;
+ uint32_t fs;
+ uint32_t es;
+ uint32_t ds;
/* The next 6 registers are included with MD_CONTEXT_X86_INTEGER */
- u_int32_t edi;
- u_int32_t esi;
- u_int32_t ebx;
- u_int32_t edx;
- u_int32_t ecx;
- u_int32_t eax;
+ uint32_t edi;
+ uint32_t esi;
+ uint32_t ebx;
+ uint32_t edx;
+ uint32_t ecx;
+ uint32_t eax;
/* The next 6 registers are included with MD_CONTEXT_X86_CONTROL */
- u_int32_t ebp;
- u_int32_t eip;
- u_int32_t cs; /* WinNT.h says "must be sanitized" */
- u_int32_t eflags; /* WinNT.h says "must be sanitized" */
- u_int32_t esp;
- u_int32_t ss;
+ uint32_t ebp;
+ uint32_t eip;
+ uint32_t cs; /* WinNT.h says "must be sanitized" */
+ uint32_t eflags; /* WinNT.h says "must be sanitized" */
+ uint32_t esp;
+ uint32_t ss;
/* The next field is included with MD_CONTEXT_X86_EXTENDED_REGISTERS.
* It contains vector (MMX/SSE) registers. It it laid out in the
* format used by the fxsave and fsrstor instructions, so it includes
* a copy of the x87 floating-point registers as well. See FXSAVE in
* "Intel Architecture Software Developer's Manual, Volume 2." */
- u_int8_t extended_registers[
+ uint8_t extended_registers[
MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE];
} MDRawContextX86; /* CONTEXT */
diff --git a/src/google_breakpad/common/minidump_format.h b/src/google_breakpad/common/minidump_format.h
index 28a81d41..af8cab0a 100644
--- a/src/google_breakpad/common/minidump_format.h
+++ b/src/google_breakpad/common/minidump_format.h
@@ -79,10 +79,10 @@
*/
typedef struct {
- u_int32_t data1;
- u_int16_t data2;
- u_int16_t data3;
- u_int8_t data4[8];
+ uint32_t data1;
+ uint16_t data2;
+ uint16_t data3;
+ uint8_t data4[8];
} MDGUID; /* GUID */
@@ -110,7 +110,7 @@ typedef struct {
* structure should never be allocated directly. The actual structure type
* can be determined by examining the context_flags field. */
typedef struct {
- u_int32_t context_flags;
+ uint32_t context_flags;
} MDRawContextBase;
#include "minidump_cpu_amd64.h"
@@ -126,19 +126,19 @@ typedef struct {
typedef struct {
- u_int32_t signature;
- u_int32_t struct_version;
- u_int32_t file_version_hi;
- u_int32_t file_version_lo;
- u_int32_t product_version_hi;
- u_int32_t product_version_lo;
- u_int32_t file_flags_mask; /* Identifies valid bits in fileFlags */
- u_int32_t file_flags;
- u_int32_t file_os;
- u_int32_t file_type;
- u_int32_t file_subtype;
- u_int32_t file_date_hi;
- u_int32_t file_date_lo;
+ uint32_t signature;
+ uint32_t struct_version;
+ uint32_t file_version_hi;
+ uint32_t file_version_lo;
+ uint32_t product_version_hi;
+ uint32_t product_version_lo;
+ uint32_t file_flags_mask; /* Identifies valid bits in fileFlags */
+ uint32_t file_flags;
+ uint32_t file_os;
+ uint32_t file_type;
+ uint32_t file_subtype;
+ uint32_t file_date_hi;
+ uint32_t file_date_lo;
} MDVSFixedFileInfo; /* VS_FIXEDFILEINFO */
/* For (MDVSFixedFileInfo).signature */
@@ -231,10 +231,10 @@ typedef struct {
/* An MDRVA is an offset into the minidump file. The beginning of the
* MDRawHeader is at offset 0. */
-typedef u_int32_t MDRVA; /* RVA */
+typedef uint32_t MDRVA; /* RVA */
typedef struct {
- u_int32_t data_size;
+ uint32_t data_size;
MDRVA rva;
} MDLocationDescriptor; /* MINIDUMP_LOCATION_DESCRIPTOR */
@@ -242,22 +242,22 @@ typedef struct {
typedef struct {
/* The base address of the memory range on the host that produced the
* minidump. */
- u_int64_t start_of_memory_range;
+ uint64_t start_of_memory_range;
MDLocationDescriptor memory;
} MDMemoryDescriptor; /* MINIDUMP_MEMORY_DESCRIPTOR */
typedef struct {
- u_int32_t signature;
- u_int32_t version;
- u_int32_t stream_count;
+ uint32_t signature;
+ uint32_t version;
+ uint32_t stream_count;
MDRVA stream_directory_rva; /* A |stream_count|-sized array of
* MDRawDirectory structures. */
- u_int32_t checksum; /* Can be 0. In fact, that's all that's
+ uint32_t checksum; /* Can be 0. In fact, that's all that's
* been found in minidump files. */
- u_int32_t time_date_stamp; /* time_t */
- u_int64_t flags;
+ uint32_t time_date_stamp; /* time_t */
+ uint64_t flags;
} MDRawHeader; /* MINIDUMP_HEADER */
/* For (MDRawHeader).signature and (MDRawHeader).version. Note that only the
@@ -302,7 +302,7 @@ typedef enum {
typedef struct {
- u_int32_t stream_type;
+ uint32_t stream_type;
MDLocationDescriptor location;
} MDRawDirectory; /* MINIDUMP_DIRECTORY */
@@ -346,27 +346,27 @@ typedef enum {
typedef struct {
- u_int32_t length; /* Length of buffer in bytes (not characters),
+ uint32_t length; /* Length of buffer in bytes (not characters),
* excluding 0-terminator */
- u_int16_t buffer[1]; /* UTF-16-encoded, 0-terminated */
+ uint16_t buffer[1]; /* UTF-16-encoded, 0-terminated */
} MDString; /* MINIDUMP_STRING */
static const size_t MDString_minsize = offsetof(MDString, buffer[0]);
typedef struct {
- u_int32_t thread_id;
- u_int32_t suspend_count;
- u_int32_t priority_class;
- u_int32_t priority;
- u_int64_t teb; /* Thread environment block */
+ uint32_t thread_id;
+ uint32_t suspend_count;
+ uint32_t priority_class;
+ uint32_t priority;
+ uint64_t teb; /* Thread environment block */
MDMemoryDescriptor stack;
MDLocationDescriptor thread_context; /* MDRawContext[CPU] */
} MDRawThread; /* MINIDUMP_THREAD */
typedef struct {
- u_int32_t number_of_threads;
+ uint32_t number_of_threads;
MDRawThread threads[1];
} MDRawThreadList; /* MINIDUMP_THREAD_LIST */
@@ -375,10 +375,10 @@ static const size_t MDRawThreadList_minsize = offsetof(MDRawThreadList,
typedef struct {
- u_int64_t base_of_image;
- u_int32_t size_of_image;
- u_int32_t checksum; /* 0 if unknown */
- u_int32_t time_date_stamp; /* time_t */
+ uint64_t base_of_image;
+ uint32_t size_of_image;
+ uint32_t checksum; /* 0 if unknown */
+ uint32_t time_date_stamp; /* time_t */
MDRVA module_name_rva; /* MDString, pathname or filename */
MDVSFixedFileInfo version_info;
@@ -402,8 +402,8 @@ typedef struct {
* As a workaround, reserved0 and reserved1 are instead defined here as
* four 32-bit quantities. This should be harmless, as there are
* currently no known uses for these fields. */
- u_int32_t reserved0[2];
- u_int32_t reserved1[2];
+ uint32_t reserved0[2];
+ uint32_t reserved1[2];
} MDRawModule; /* MINIDUMP_MODULE */
/* The inclusion of a 64-bit type in MINIDUMP_MODULE forces the struct to
@@ -419,15 +419,15 @@ typedef struct {
* MDCVInfoPDB70 is the expected structure type with recent toolchains. */
typedef struct {
- u_int32_t signature;
- u_int32_t offset; /* Offset to debug data (expect 0 in minidump) */
+ uint32_t signature;
+ uint32_t offset; /* Offset to debug data (expect 0 in minidump) */
} MDCVHeader;
typedef struct {
MDCVHeader cv_header;
- u_int32_t signature; /* time_t debug information created */
- u_int32_t age; /* revision of PDB file */
- u_int8_t pdb_file_name[1]; /* Pathname or filename of PDB file */
+ uint32_t signature; /* time_t debug information created */
+ uint32_t age; /* revision of PDB file */
+ uint8_t pdb_file_name[1]; /* Pathname or filename of PDB file */
} MDCVInfoPDB20;
static const size_t MDCVInfoPDB20_minsize = offsetof(MDCVInfoPDB20,
@@ -436,10 +436,10 @@ static const size_t MDCVInfoPDB20_minsize = offsetof(MDCVInfoPDB20,
#define MD_CVINFOPDB20_SIGNATURE 0x3031424e /* cvHeader.signature = '01BN' */
typedef struct {
- u_int32_t cv_signature;
+ uint32_t cv_signature;
MDGUID signature; /* GUID, identifies PDB file */
- u_int32_t age; /* Identifies incremental changes to PDB file */
- u_int8_t pdb_file_name[1]; /* Pathname or filename of PDB file,
+ uint32_t age; /* Identifies incremental changes to PDB file */
+ uint8_t pdb_file_name[1]; /* Pathname or filename of PDB file,
* 0-terminated 8-bit character data (UTF-8?) */
} MDCVInfoPDB70;
@@ -449,12 +449,12 @@ static const size_t MDCVInfoPDB70_minsize = offsetof(MDCVInfoPDB70,
#define MD_CVINFOPDB70_SIGNATURE 0x53445352 /* cvSignature = 'SDSR' */
typedef struct {
- u_int32_t data1[2];
- u_int32_t data2;
- u_int32_t data3;
- u_int32_t data4;
- u_int32_t data5[3];
- u_int8_t extra[2];
+ uint32_t data1[2];
+ uint32_t data2;
+ uint32_t data3;
+ uint32_t data4;
+ uint32_t data5[3];
+ uint8_t extra[2];
} MDCVInfoELF;
/* In addition to the two CodeView record formats above, used for linking
@@ -479,12 +479,12 @@ typedef struct {
* obsolete with modules built by recent toolchains. */
typedef struct {
- u_int32_t data_type; /* IMAGE_DEBUG_TYPE_*, not defined here because
+ uint32_t data_type; /* IMAGE_DEBUG_TYPE_*, not defined here because
* this debug record type is mostly obsolete. */
- u_int32_t length; /* Length of entire MDImageDebugMisc structure */
- u_int8_t unicode; /* True if data is multibyte */
- u_int8_t reserved[3];
- u_int8_t data[1];
+ uint32_t length; /* Length of entire MDImageDebugMisc structure */
+ uint8_t unicode; /* True if data is multibyte */
+ uint8_t reserved[3];
+ uint8_t data[1];
} MDImageDebugMisc; /* IMAGE_DEBUG_MISC */
static const size_t MDImageDebugMisc_minsize = offsetof(MDImageDebugMisc,
@@ -492,7 +492,7 @@ static const size_t MDImageDebugMisc_minsize = offsetof(MDImageDebugMisc,
typedef struct {
- u_int32_t number_of_modules;
+ uint32_t number_of_modules;
MDRawModule modules[1];
} MDRawModuleList; /* MINIDUMP_MODULE_LIST */
@@ -501,7 +501,7 @@ static const size_t MDRawModuleList_minsize = offsetof(MDRawModuleList,
typedef struct {
- u_int32_t number_of_memory_ranges;
+ uint32_t number_of_memory_ranges;
MDMemoryDescriptor memory_ranges[1];
} MDRawMemoryList; /* MINIDUMP_MEMORY_LIST */
@@ -512,21 +512,21 @@ static const size_t MDRawMemoryList_minsize = offsetof(MDRawMemoryList,
#define MD_EXCEPTION_MAXIMUM_PARAMETERS 15
typedef struct {
- u_int32_t exception_code; /* Windows: MDExceptionCodeWin,
+ uint32_t exception_code; /* Windows: MDExceptionCodeWin,
* Mac OS X: MDExceptionMac,
* Linux: MDExceptionCodeLinux. */
- u_int32_t exception_flags; /* Windows: 1 if noncontinuable,
+ uint32_t exception_flags; /* Windows: 1 if noncontinuable,
Mac OS X: MDExceptionCodeMac. */
- u_int64_t exception_record; /* Address (in the minidump-producing host's
+ uint64_t exception_record; /* Address (in the minidump-producing host's
* memory) of another MDException, for
* nested exceptions. */
- u_int64_t exception_address; /* The address that caused the exception.
+ uint64_t exception_address; /* The address that caused the exception.
* Mac OS X: exception subcode (which is
* typically the address). */
- u_int32_t number_parameters; /* Number of valid elements in
+ uint32_t number_parameters; /* Number of valid elements in
* exception_information. */
- u_int32_t __align;
- u_int64_t exception_information[MD_EXCEPTION_MAXIMUM_PARAMETERS];
+ uint32_t __align;
+ uint64_t exception_information[MD_EXCEPTION_MAXIMUM_PARAMETERS];
} MDException; /* MINIDUMP_EXCEPTION */
#include "minidump_exception_win32.h"
@@ -535,10 +535,10 @@ typedef struct {
#include "minidump_exception_solaris.h"
typedef struct {
- u_int32_t thread_id; /* Thread in which the exception
+ uint32_t thread_id; /* Thread in which the exception
* occurred. Corresponds to
* (MDRawThread).thread_id. */
- u_int32_t __align;
+ uint32_t __align;
MDException exception_record;
MDLocationDescriptor thread_context; /* MDRawContext[CPU] */
} MDRawExceptionStream; /* MINIDUMP_EXCEPTION_STREAM */
@@ -546,13 +546,13 @@ typedef struct {
typedef union {
struct {
- u_int32_t vendor_id[3]; /* cpuid 0: ebx, edx, ecx */
- u_int32_t version_information; /* cpuid 1: eax */
- u_int32_t feature_information; /* cpuid 1: edx */
- u_int32_t amd_extended_cpu_features; /* cpuid 0x80000001, ebx */
+ uint32_t vendor_id[3]; /* cpuid 0: ebx, edx, ecx */
+ uint32_t version_information; /* cpuid 1: eax */
+ uint32_t feature_information; /* cpuid 1: edx */
+ uint32_t amd_extended_cpu_features; /* cpuid 0x80000001, ebx */
} x86_cpu_info;
struct {
- u_int64_t processor_features[2];
+ uint64_t processor_features[2];
} other_cpu_info;
} MDCPUInformation; /* CPU_INFORMATION */
@@ -560,20 +560,20 @@ typedef union {
typedef struct {
/* The next 3 fields and numberOfProcessors are from the SYSTEM_INFO
* structure as returned by GetSystemInfo */
- u_int16_t processor_architecture;
- u_int16_t processor_level; /* x86: 5 = 586, 6 = 686, ... */
- u_int16_t processor_revision; /* x86: 0xMMSS, where MM=model,
+ uint16_t processor_architecture;
+ uint16_t processor_level; /* x86: 5 = 586, 6 = 686, ... */
+ uint16_t processor_revision; /* x86: 0xMMSS, where MM=model,
* SS=stepping */
- u_int8_t number_of_processors;
- u_int8_t product_type; /* Windows: VER_NT_* from WinNT.h */
+ uint8_t number_of_processors;
+ uint8_t product_type; /* Windows: VER_NT_* from WinNT.h */
/* The next 5 fields are from the OSVERSIONINFO structure as returned
* by GetVersionEx */
- u_int32_t major_version;
- u_int32_t minor_version;
- u_int32_t build_number;
- u_int32_t platform_id;
+ uint32_t major_version;
+ uint32_t minor_version;
+ uint32_t build_number;
+ uint32_t platform_id;
MDRVA csd_version_rva; /* MDString further identifying the
* host OS.
* Windows: name of the installed OS
@@ -582,8 +582,8 @@ typedef struct {
* (sw_vers -buildVersion).
* Linux: uname -srvmo */
- u_int16_t suite_mask; /* Windows: VER_SUITE_* from WinNT.h */
- u_int16_t reserved2;
+ uint16_t suite_mask; /* Windows: VER_SUITE_* from WinNT.h */
+ uint16_t reserved2;
MDCPUInformation cpu;
} MDRawSystemInfo; /* MINIDUMP_SYSTEM_INFO */
@@ -627,29 +627,29 @@ typedef enum {
typedef struct {
- u_int32_t size_of_info; /* Length of entire MDRawMiscInfo structure. */
- u_int32_t flags1;
+ uint32_t size_of_info; /* Length of entire MDRawMiscInfo structure. */
+ uint32_t flags1;
/* The next field is only valid if flags1 contains
* MD_MISCINFO_FLAGS1_PROCESS_ID. */
- u_int32_t process_id;
+ uint32_t process_id;
/* The next 3 fields are only valid if flags1 contains
* MD_MISCINFO_FLAGS1_PROCESS_TIMES. */
- u_int32_t process_create_time; /* time_t process started */
- u_int32_t process_user_time; /* seconds of user CPU time */
- u_int32_t process_kernel_time; /* seconds of kernel CPU time */
+ uint32_t process_create_time; /* time_t process started */
+ uint32_t process_user_time; /* seconds of user CPU time */
+ uint32_t process_kernel_time; /* seconds of kernel CPU time */
/* The following fields are not present in MINIDUMP_MISC_INFO but are
* in MINIDUMP_MISC_INFO_2. When this struct is populated, these values
* may not be set. Use flags1 or sizeOfInfo to determine whether these
* values are present. These are only valid when flags1 contains
* MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO. */
- u_int32_t processor_max_mhz;
- u_int32_t processor_current_mhz;
- u_int32_t processor_mhz_limit;
- u_int32_t processor_max_idle_state;
- u_int32_t processor_current_idle_state;
+ uint32_t processor_max_mhz;
+ uint32_t processor_current_mhz;
+ uint32_t processor_mhz_limit;
+ uint32_t processor_max_idle_state;
+ uint32_t processor_current_idle_state;
} MDRawMiscInfo; /* MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO2 */
#define MD_MISCINFO_SIZE 24
@@ -666,7 +666,7 @@ typedef enum {
/* MINIDUMP_MISC1_PROCESSOR_POWER_INFO */
} 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
@@ -677,24 +677,24 @@ typedef enum {
*/
typedef struct {
- u_int32_t size_of_header; /* sizeof(MDRawMemoryInfoList) */
- u_int32_t size_of_entry; /* sizeof(MDRawMemoryInfo) */
- u_int64_t number_of_entries;
+ uint32_t size_of_header; /* sizeof(MDRawMemoryInfoList) */
+ uint32_t size_of_entry; /* sizeof(MDRawMemoryInfo) */
+ uint64_t number_of_entries;
} MDRawMemoryInfoList; /* MINIDUMP_MEMORY_INFO_LIST */
typedef struct {
- u_int64_t base_address; /* Base address of a region of pages */
- u_int64_t allocation_base; /* Base address of a range of pages
+ uint64_t base_address; /* Base address of a region of pages */
+ uint64_t allocation_base; /* Base address of a range of pages
* within this region. */
- u_int32_t allocation_protection; /* Memory protection when this region
+ uint32_t allocation_protection; /* Memory protection when this region
* was originally allocated:
* MDMemoryProtection */
- u_int32_t __alignment1;
- u_int64_t region_size;
- u_int32_t state; /* MDMemoryState */
- u_int32_t protection; /* MDMemoryProtection */
- u_int32_t type; /* MDMemoryType */
- u_int32_t __alignment2;
+ uint32_t __alignment1;
+ uint64_t region_size;
+ uint32_t state; /* MDMemoryState */
+ uint32_t protection; /* MDMemoryProtection */
+ uint32_t type; /* MDMemoryType */
+ uint32_t __alignment2;
} MDRawMemoryInfo; /* MINIDUMP_MEMORY_INFO */
/* For (MDRawMemoryInfo).state */
@@ -721,7 +721,7 @@ typedef enum {
} MDMemoryProtection;
/* Used to mask the mutually exclusive options from the combinable flags. */
-const u_int32_t MD_MEMORY_PROTECTION_ACCESS_MASK = 0xFF;
+const uint32_t MD_MEMORY_PROTECTION_ACCESS_MASK = 0xFF;
/* For (MDRawMemoryInfo).type */
typedef enum {
@@ -738,7 +738,7 @@ typedef enum {
typedef struct {
/* validity is a bitmask with values from MDBreakpadInfoValidity, indicating
* which of the other fields in the structure are valid. */
- u_int32_t validity;
+ uint32_t validity;
/* Thread ID of the handler thread. dump_thread_id should correspond to
* the thread_id of an MDRawThread in the minidump's MDRawThreadList if
@@ -746,7 +746,7 @@ typedef struct {
* the MDRawThreadList does not contain a dedicated thread used to produce
* the minidump, this field should be set to 0 and the validity field
* must not contain MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID. */
- u_int32_t dump_thread_id;
+ uint32_t dump_thread_id;
/* Thread ID of the thread that requested the minidump be produced. As
* with dump_thread_id, requesting_thread_id should correspond to the
@@ -759,7 +759,7 @@ typedef struct {
* other than a thread in the MDRawThreadList, this field should be set
* to 0 and the validity field must not contain
* MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID. */
- u_int32_t requesting_thread_id;
+ uint32_t requesting_thread_id;
} MDRawBreakpadInfo;
/* For (MDRawBreakpadInfo).validity: */
@@ -777,11 +777,11 @@ typedef struct {
* written to a file.
* Fixed-length strings are used because MiniDumpWriteDump doesn't offer
* a way for user streams to point to arbitrary RVAs for strings. */
- u_int16_t expression[128]; /* Assertion that failed... */
- u_int16_t function[128]; /* ...within this function... */
- u_int16_t file[128]; /* ...in this file... */
- u_int32_t line; /* ...at this line. */
- u_int32_t type;
+ uint16_t expression[128]; /* Assertion that failed... */
+ uint16_t function[128]; /* ...within this function... */
+ uint16_t file[128]; /* ...in this file... */
+ uint32_t line; /* ...at this line. */
+ uint32_t type;
} MDRawAssertionInfo;
/* For (MDRawAssertionInfo).type: */
@@ -806,9 +806,9 @@ typedef struct {
} MDRawLinkMap;
typedef struct {
- u_int32_t version;
+ uint32_t version;
MDRVA map;
- u_int32_t dso_count;
+ uint32_t dso_count;
void* brk;
void* ldbase;
void* dynamic;