aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/minidump_writer
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/client/linux/minidump_writer
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/client/linux/minidump_writer')
-rw-r--r--src/client/linux/minidump_writer/minidump_writer.cc18
-rw-r--r--src/client/linux/minidump_writer/minidump_writer.h2
-rw-r--r--src/client/linux/minidump_writer/minidump_writer_unittest.cc14
3 files changed, 17 insertions, 17 deletions
diff --git a/src/client/linux/minidump_writer/minidump_writer.cc b/src/client/linux/minidump_writer/minidump_writer.cc
index 92632014..600e0a11 100644
--- a/src/client/linux/minidump_writer/minidump_writer.cc
+++ b/src/client/linux/minidump_writer/minidump_writer.cc
@@ -333,7 +333,7 @@ void CPUFillFromThreadInfo(MDRawContextARM* out,
out->cpsr = 0;
#if !defined(__ANDROID__)
out->float_save.fpscr = info.fpregs.fpsr |
- (static_cast<u_int64_t>(info.fpregs.fpcr) << 32);
+ (static_cast<uint64_t>(info.fpregs.fpcr) << 32);
// TODO: sort this out, actually collect floating point registers
my_memset(&out->float_save.regs, 0, sizeof(out->float_save.regs));
my_memset(&out->float_save.extra, 0, sizeof(out->float_save.extra));
@@ -535,8 +535,8 @@ class MinidumpWriter {
void PopSeccompStackFrame(RawContextCPU* cpu, const MDRawThread& thread,
uint8_t* stack_copy) {
#if defined(__x86_64)
- u_int64_t bp = cpu->rbp;
- u_int64_t top = thread.stack.start_of_memory_range;
+ uint64_t bp = cpu->rbp;
+ uint64_t top = thread.stack.start_of_memory_range;
for (int i = 4; i--; ) {
if (bp < top ||
bp + sizeof(bp) > thread.stack.start_of_memory_range +
@@ -546,7 +546,7 @@ class MinidumpWriter {
}
uint64_t old_top = top;
top = bp;
- u_int8_t* bp_addr = stack_copy + bp - thread.stack.start_of_memory_range;
+ uint8_t* bp_addr = stack_copy + bp - thread.stack.start_of_memory_range;
my_memcpy(&bp, bp_addr, sizeof(bp));
if (bp == 0xDEADBEEFDEADBEEFull) {
struct {
@@ -598,8 +598,8 @@ class MinidumpWriter {
}
}
#elif defined(__i386)
- u_int32_t bp = cpu->ebp;
- u_int32_t top = thread.stack.start_of_memory_range;
+ uint32_t bp = cpu->ebp;
+ uint32_t top = thread.stack.start_of_memory_range;
for (int i = 4; i--; ) {
if (bp < top ||
bp + sizeof(bp) > thread.stack.start_of_memory_range +
@@ -609,7 +609,7 @@ class MinidumpWriter {
}
uint32_t old_top = top;
top = bp;
- u_int8_t* bp_addr = stack_copy + bp - thread.stack.start_of_memory_range;
+ uint8_t* bp_addr = stack_copy + bp - thread.stack.start_of_memory_range;
my_memcpy(&bp, bp_addr, sizeof(bp));
if (bp == 0xDEADBEEFu) {
struct {
@@ -721,7 +721,7 @@ class MinidumpWriter {
// Copy 256 bytes around crashing instruction pointer to minidump.
const size_t kIPMemorySize = 256;
- u_int64_t ip = GetInstructionPointer();
+ uint64_t ip = GetInstructionPointer();
// Bound it to the upper and lower bounds of the memory map
// it's contained within. If it's not in mapped memory,
// don't bother trying to write it.
@@ -921,7 +921,7 @@ class MinidumpWriter {
bool member,
unsigned int mapping_id,
MDRawModule& mod,
- const u_int8_t* identifier) {
+ const uint8_t* identifier) {
my_memset(&mod, 0, MD_MODULE_SIZE);
mod.base_of_image = mapping.start_addr;
diff --git a/src/client/linux/minidump_writer/minidump_writer.h b/src/client/linux/minidump_writer/minidump_writer.h
index 790ff723..c9e150ae 100644
--- a/src/client/linux/minidump_writer/minidump_writer.h
+++ b/src/client/linux/minidump_writer/minidump_writer.h
@@ -46,7 +46,7 @@ class ExceptionHandler;
struct MappingEntry {
MappingInfo first;
- u_int8_t second[sizeof(MDGUID)];
+ uint8_t second[sizeof(MDGUID)];
};
// A list of <MappingInfo, GUID>
diff --git a/src/client/linux/minidump_writer/minidump_writer_unittest.cc b/src/client/linux/minidump_writer/minidump_writer_unittest.cc
index d884a42b..ace7f350 100644
--- a/src/client/linux/minidump_writer/minidump_writer_unittest.cc
+++ b/src/client/linux/minidump_writer/minidump_writer_unittest.cc
@@ -131,9 +131,9 @@ TEST(MinidumpWriterTest, MappingInfo) {
// These are defined here so the parent can use them to check the
// data from the minidump afterwards.
- const u_int32_t memory_size = sysconf(_SC_PAGESIZE);
+ const uint32_t memory_size = sysconf(_SC_PAGESIZE);
const char* kMemoryName = "a fake module";
- const u_int8_t kModuleGUID[sizeof(MDGUID)] = {
+ const uint8_t kModuleGUID[sizeof(MDGUID)] = {
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF
};
@@ -213,7 +213,7 @@ TEST(MinidumpWriterTest, MappingInfo) {
EXPECT_EQ(kMemoryName, module->code_file());
EXPECT_EQ(module_identifier, module->debug_identifier());
- u_int32_t len;
+ uint32_t len;
// These streams are expected to be there
EXPECT_TRUE(minidump.SeekToStreamType(MD_THREAD_LIST_STREAM, &len));
EXPECT_TRUE(minidump.SeekToStreamType(MD_MEMORY_LIST_STREAM, &len));
@@ -241,7 +241,7 @@ TEST(MinidumpWriterTest, MappingInfoContained) {
// data from the minidump afterwards.
const int32_t memory_size = sysconf(_SC_PAGESIZE);
const char* kMemoryName = "a fake module";
- const u_int8_t kModuleGUID[sizeof(MDGUID)] = {
+ const uint8_t kModuleGUID[sizeof(MDGUID)] = {
0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF
};
@@ -435,15 +435,15 @@ TEST(MinidumpWriterTest, AdditionalMemory) {
// These are defined here so the parent can use them to check the
// data from the minidump afterwards.
- const u_int32_t kMemorySize = sysconf(_SC_PAGESIZE);
+ const uint32_t kMemorySize = sysconf(_SC_PAGESIZE);
// Get some heap memory.
- u_int8_t* memory = new u_int8_t[kMemorySize];
+ uint8_t* memory = new uint8_t[kMemorySize];
const uintptr_t kMemoryAddress = reinterpret_cast<uintptr_t>(memory);
ASSERT_TRUE(memory);
// Stick some data into the memory so the contents can be verified.
- for (u_int32_t i = 0; i < kMemorySize; ++i) {
+ for (uint32_t i = 0; i < kMemorySize; ++i) {
memory[i] = i % 255;
}