aboutsummaryrefslogtreecommitdiff
path: root/src/client
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
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')
-rw-r--r--src/client/linux/crash_generation/crash_generation_server.cc2
-rw-r--r--src/client/linux/handler/exception_handler.cc2
-rw-r--r--src/client/linux/handler/exception_handler.h2
-rw-r--r--src/client/linux/handler/exception_handler_unittest.cc42
-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
-rw-r--r--src/client/mac/handler/minidump_generator.cc38
-rw-r--r--src/client/mac/handler/minidump_generator.h12
-rw-r--r--src/client/mac/tests/crash_generation_server_test.cc2
-rw-r--r--src/client/mac/tests/exception_handler_test.cc26
-rw-r--r--src/client/mac/tests/minidump_generator_test.cc2
-rw-r--r--src/client/mac/tests/spawn_child_process.h2
-rw-r--r--src/client/minidump_file_writer.cc18
-rw-r--r--src/client/minidump_file_writer.h2
-rw-r--r--src/client/solaris/handler/minidump_generator.cc4
-rwxr-xr-x[-rw-r--r--]src/client/windows/crash_generation/minidump_generator.h1
-rw-r--r--src/client/windows/unittests/exception_handler_death_test.cc24
-rw-r--r--src/client/windows/unittests/exception_handler_test.cc12
19 files changed, 113 insertions, 112 deletions
diff --git a/src/client/linux/crash_generation/crash_generation_server.cc b/src/client/linux/crash_generation/crash_generation_server.cc
index ff891353..f1e16b1d 100644
--- a/src/client/linux/crash_generation/crash_generation_server.cc
+++ b/src/client/linux/crash_generation/crash_generation_server.cc
@@ -90,7 +90,7 @@ GetInodeForProcPath(ino_t* inode_out, const char* path)
}
char* endptr;
- const u_int64_t inode_ul =
+ const uint64_t inode_ul =
strtoull(buf + sizeof(kSocketLinkPrefix) - 1, &endptr, 10);
if (*endptr != ']')
return false;
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
index e62219d3..55834e01 100644
--- a/src/client/linux/handler/exception_handler.cc
+++ b/src/client/linux/handler/exception_handler.cc
@@ -597,7 +597,7 @@ bool ExceptionHandler::WriteMinidump() {
}
void ExceptionHandler::AddMappingInfo(const string& name,
- const u_int8_t identifier[sizeof(MDGUID)],
+ const uint8_t identifier[sizeof(MDGUID)],
uintptr_t start_address,
size_t mapping_size,
size_t file_offset) {
diff --git a/src/client/linux/handler/exception_handler.h b/src/client/linux/handler/exception_handler.h
index bd510d9e..71554196 100644
--- a/src/client/linux/handler/exception_handler.h
+++ b/src/client/linux/handler/exception_handler.h
@@ -205,7 +205,7 @@ class ExceptionHandler {
// a custom library loader is used that maps things in a way
// that the linux dumper can't handle by reading the maps file.
void AddMappingInfo(const string& name,
- const u_int8_t identifier[sizeof(MDGUID)],
+ const uint8_t identifier[sizeof(MDGUID)],
uintptr_t start_address,
size_t mapping_size,
size_t file_offset);
diff --git a/src/client/linux/handler/exception_handler_unittest.cc b/src/client/linux/handler/exception_handler_unittest.cc
index d7176916..27a7a777 100644
--- a/src/client/linux/handler/exception_handler_unittest.cc
+++ b/src/client/linux/handler/exception_handler_unittest.cc
@@ -423,7 +423,7 @@ TEST(ExceptionHandlerTest, InstructionPointerMemory) {
// These are defined here so the parent can use them to check the
// data from the minidump afterwards.
- const u_int32_t kMemorySize = 256; // bytes
+ const uint32_t kMemorySize = 256; // bytes
const int kOffset = kMemorySize / 2;
// This crashes with SIGILL on x86/x86-64/arm.
const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff };
@@ -483,7 +483,7 @@ TEST(ExceptionHandlerTest, InstructionPointerMemory) {
MinidumpContext* context = exception->GetContext();
ASSERT_TRUE(context);
- u_int64_t instruction_pointer;
+ uint64_t instruction_pointer;
ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
@@ -491,11 +491,11 @@ TEST(ExceptionHandlerTest, InstructionPointerMemory) {
ASSERT_TRUE(region);
EXPECT_EQ(kMemorySize, region->GetSize());
- const u_int8_t* bytes = region->GetMemory();
+ const uint8_t* bytes = region->GetMemory();
ASSERT_TRUE(bytes);
- u_int8_t prefix_bytes[kOffset];
- u_int8_t suffix_bytes[kMemorySize - kOffset - sizeof(instructions)];
+ uint8_t prefix_bytes[kOffset];
+ uint8_t suffix_bytes[kMemorySize - kOffset - sizeof(instructions)];
memset(prefix_bytes, 0, sizeof(prefix_bytes));
memset(suffix_bytes, 0, sizeof(suffix_bytes));
EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0);
@@ -515,7 +515,7 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryMinBound) {
// These are defined here so the parent can use them to check the
// data from the minidump afterwards.
- const u_int32_t kMemorySize = 256; // bytes
+ const uint32_t kMemorySize = 256; // bytes
const int kOffset = 0;
// This crashes with SIGILL on x86/x86-64/arm.
const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff };
@@ -575,7 +575,7 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryMinBound) {
MinidumpContext* context = exception->GetContext();
ASSERT_TRUE(context);
- u_int64_t instruction_pointer;
+ uint64_t instruction_pointer;
ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
@@ -583,10 +583,10 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryMinBound) {
ASSERT_TRUE(region);
EXPECT_EQ(kMemorySize / 2, region->GetSize());
- const u_int8_t* bytes = region->GetMemory();
+ const uint8_t* bytes = region->GetMemory();
ASSERT_TRUE(bytes);
- u_int8_t suffix_bytes[kMemorySize / 2 - sizeof(instructions)];
+ uint8_t suffix_bytes[kMemorySize / 2 - sizeof(instructions)];
memset(suffix_bytes, 0, sizeof(suffix_bytes));
EXPECT_TRUE(memcmp(bytes + kOffset, instructions, sizeof(instructions)) == 0);
EXPECT_TRUE(memcmp(bytes + kOffset + sizeof(instructions),
@@ -606,7 +606,7 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) {
// Use 4k here because the OS will hand out a single page even
// if a smaller size is requested, and this test wants to
// test the upper bound of the memory range.
- const u_int32_t kMemorySize = 4096; // bytes
+ const uint32_t kMemorySize = 4096; // bytes
// This crashes with SIGILL on x86/x86-64/arm.
const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff };
const int kOffset = kMemorySize - sizeof(instructions);
@@ -665,7 +665,7 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) {
MinidumpContext* context = exception->GetContext();
ASSERT_TRUE(context);
- u_int64_t instruction_pointer;
+ uint64_t instruction_pointer;
ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
@@ -674,10 +674,10 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) {
const size_t kPrefixSize = 128; // bytes
EXPECT_EQ(kPrefixSize + sizeof(instructions), region->GetSize());
- const u_int8_t* bytes = region->GetMemory();
+ const uint8_t* bytes = region->GetMemory();
ASSERT_TRUE(bytes);
- u_int8_t prefix_bytes[kPrefixSize];
+ uint8_t prefix_bytes[kPrefixSize];
memset(prefix_bytes, 0, sizeof(prefix_bytes));
EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0);
EXPECT_TRUE(memcmp(bytes + kPrefixSize,
@@ -742,9 +742,9 @@ TEST(ExceptionHandlerTest, InstructionPointerMemoryNullPointer) {
TEST(ExceptionHandlerTest, ModuleInfo) {
// 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);
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
};
@@ -998,15 +998,15 @@ TEST(ExceptionHandlerTest, GenerateMultipleDumpsWithPath) {
// Test that an additional memory region can be added to the minidump.
TEST(ExceptionHandlerTest, AdditionalMemory) {
- 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;
}
@@ -1042,10 +1042,10 @@ TEST(ExceptionHandlerTest, AdditionalMemory) {
// Test that a memory region that was previously registered
// can be unregistered.
TEST(ExceptionHandlerTest, AdditionalMemoryRemove) {
- 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);
@@ -1109,7 +1109,7 @@ TEST(ExceptionHandlerTest, WriteMinidumpForChild) {
// Check that the crashing thread is the main thread of |child|
MinidumpException* exception = minidump.GetException();
ASSERT_TRUE(exception);
- u_int32_t thread_id;
+ uint32_t thread_id;
ASSERT_TRUE(exception->GetThreadID(&thread_id));
EXPECT_EQ(child, static_cast<int32_t>(thread_id));
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;
}
diff --git a/src/client/mac/handler/minidump_generator.cc b/src/client/mac/handler/minidump_generator.cc
index fac1a60b..85c53ebb 100644
--- a/src/client/mac/handler/minidump_generator.cc
+++ b/src/client/mac/handler/minidump_generator.cc
@@ -410,7 +410,7 @@ bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state,
}
}
-u_int64_t MinidumpGenerator::CurrentPCForStack(
+uint64_t MinidumpGenerator::CurrentPCForStack(
breakpad_thread_state_data_t state) {
switch (cpu_type_) {
#ifdef HAS_ARM_SUPPORT
@@ -444,7 +444,7 @@ bool MinidumpGenerator::WriteStackARM(breakpad_thread_state_data_t state,
return WriteStackFromStartAddress(start_addr, stack_location);
}
-u_int64_t
+uint64_t
MinidumpGenerator::CurrentPCForStackARM(breakpad_thread_state_data_t state) {
arm_thread_state_t *machine_state =
reinterpret_cast<arm_thread_state_t *>(state);
@@ -510,7 +510,7 @@ bool MinidumpGenerator::WriteStackPPC64(breakpad_thread_state_data_t state,
return WriteStackFromStartAddress(start_addr, stack_location);
}
-u_int64_t
+uint64_t
MinidumpGenerator::CurrentPCForStackPPC(breakpad_thread_state_data_t state) {
ppc_thread_state_t *machine_state =
reinterpret_cast<ppc_thread_state_t *>(state);
@@ -518,7 +518,7 @@ MinidumpGenerator::CurrentPCForStackPPC(breakpad_thread_state_data_t state) {
return REGISTER_FROM_THREADSTATE(machine_state, srr0);
}
-u_int64_t
+uint64_t
MinidumpGenerator::CurrentPCForStackPPC64(breakpad_thread_state_data_t state) {
ppc_thread_state64_t *machine_state =
reinterpret_cast<ppc_thread_state64_t *>(state);
@@ -672,7 +672,7 @@ bool MinidumpGenerator::WriteStackX86_64(breakpad_thread_state_data_t state,
return WriteStackFromStartAddress(start_addr, stack_location);
}
-u_int64_t
+uint64_t
MinidumpGenerator::CurrentPCForStackX86(breakpad_thread_state_data_t state) {
i386_thread_state_t *machine_state =
reinterpret_cast<i386_thread_state_t *>(state);
@@ -680,7 +680,7 @@ MinidumpGenerator::CurrentPCForStackX86(breakpad_thread_state_data_t state) {
return REGISTER_FROM_THREADSTATE(machine_state, eip);
}
-u_int64_t
+uint64_t
MinidumpGenerator::CurrentPCForStackX86_64(breakpad_thread_state_data_t state) {
x86_thread_state64_t *machine_state =
reinterpret_cast<x86_thread_state64_t *>(state);
@@ -764,7 +764,7 @@ bool MinidumpGenerator::WriteContextX86_64(
// not used in the flags register. Since the minidump format
// specifies 32 bits for the flags register, we can truncate safely
// with no loss.
- context_ptr->eflags = static_cast<u_int32_t>(REGISTER_FROM_THREADSTATE(machine_state, rflags));
+ context_ptr->eflags = static_cast<uint32_t>(REGISTER_FROM_THREADSTATE(machine_state, rflags));
AddReg(cs);
AddReg(fs);
AddReg(gs);
@@ -899,7 +899,7 @@ bool MinidumpGenerator::WriteMemoryListStream(
= static_cast<mach_msg_type_number_t>(sizeof(state));
if (GetThreadState(exception_thread_, state, &stateCount)) {
- u_int64_t ip = CurrentPCForStack(state);
+ uint64_t ip = CurrentPCForStack(state);
// Bound it to the upper and lower bounds of the region
// it's contained within. If it's not in a known memory region,
// don't bother trying to write it.
@@ -1162,7 +1162,7 @@ bool MinidumpGenerator::WriteModuleStream(unsigned int index,
return false;
module->base_of_image = image->GetVMAddr() + image->GetVMAddrSlide();
- module->size_of_image = static_cast<u_int32_t>(image->GetVMSize());
+ module->size_of_image = static_cast<uint32_t>(image->GetVMSize());
module->module_name_rva = string_location.rva;
// We'll skip the executable module, because they don't have
@@ -1228,7 +1228,7 @@ bool MinidumpGenerator::WriteModuleStream(unsigned int index,
return false;
module->base_of_image = seg->vmaddr + slide;
- module->size_of_image = static_cast<u_int32_t>(seg->vmsize);
+ module->size_of_image = static_cast<uint32_t>(seg->vmsize);
module->module_name_rva = string_location.rva;
bool in_memory = false;
@@ -1287,7 +1287,7 @@ bool MinidumpGenerator::WriteCVRecord(MDRawModule *module, int cpu_type,
size_t module_name_length = strlen(module_name);
- if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(u_int8_t)))
+ if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(uint8_t)))
return false;
if (!cv.CopyIndexAfterObject(0, module_name, module_name_length))
@@ -1388,7 +1388,7 @@ bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) {
misc_info_stream->location = info.location();
MDRawMiscInfo *info_ptr = info.get();
- info_ptr->size_of_info = static_cast<u_int32_t>(sizeof(MDRawMiscInfo));
+ info_ptr->size_of_info = static_cast<uint32_t>(sizeof(MDRawMiscInfo));
info_ptr->flags1 = MD_MISCINFO_FLAGS1_PROCESS_ID |
MD_MISCINFO_FLAGS1_PROCESS_TIMES |
MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO;
@@ -1401,18 +1401,18 @@ bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) {
if (getrusage(RUSAGE_SELF, &usage) != -1) {
// Omit the fractional time since the MDRawMiscInfo only wants seconds
info_ptr->process_user_time =
- static_cast<u_int32_t>(usage.ru_utime.tv_sec);
+ static_cast<uint32_t>(usage.ru_utime.tv_sec);
info_ptr->process_kernel_time =
- static_cast<u_int32_t>(usage.ru_stime.tv_sec);
+ static_cast<uint32_t>(usage.ru_stime.tv_sec);
}
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID,
static_cast<int>(info_ptr->process_id) };
- u_int mibsize = static_cast<u_int>(sizeof(mib) / sizeof(mib[0]));
+ uint mibsize = static_cast<uint>(sizeof(mib) / sizeof(mib[0]));
struct kinfo_proc proc;
size_t size = sizeof(proc);
if (sysctl(mib, mibsize, &proc, &size, NULL, 0) == 0) {
info_ptr->process_create_time =
- static_cast<u_int32_t>(proc.kp_proc.p_starttime.tv_sec);
+ static_cast<uint32_t>(proc.kp_proc.p_starttime.tv_sec);
}
// Speed
@@ -1420,11 +1420,11 @@ bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) {
const uint64_t kOneMillion = 1000 * 1000;
size = sizeof(speed);
sysctlbyname("hw.cpufrequency_max", &speed, &size, NULL, 0);
- info_ptr->processor_max_mhz = static_cast<u_int32_t>(speed / kOneMillion);
- info_ptr->processor_mhz_limit = static_cast<u_int32_t>(speed / kOneMillion);
+ info_ptr->processor_max_mhz = static_cast<uint32_t>(speed / kOneMillion);
+ info_ptr->processor_mhz_limit = static_cast<uint32_t>(speed / kOneMillion);
size = sizeof(speed);
sysctlbyname("hw.cpufrequency", &speed, &size, NULL, 0);
- info_ptr->processor_current_mhz = static_cast<u_int32_t>(speed / kOneMillion);
+ info_ptr->processor_current_mhz = static_cast<uint32_t>(speed / kOneMillion);
return true;
}
diff --git a/src/client/mac/handler/minidump_generator.h b/src/client/mac/handler/minidump_generator.h
index ef947841..c79873fa 100644
--- a/src/client/mac/handler/minidump_generator.h
+++ b/src/client/mac/handler/minidump_generator.h
@@ -130,7 +130,7 @@ class MinidumpGenerator {
bool WriteBreakpadInfoStream(MDRawDirectory *breakpad_info_stream);
// Helpers
- u_int64_t CurrentPCForStack(breakpad_thread_state_data_t state);
+ uint64_t CurrentPCForStack(breakpad_thread_state_data_t state);
bool GetThreadState(thread_act_t target_thread, thread_state_t state,
mach_msg_type_number_t *count);
bool WriteStackFromStartAddress(mach_vm_address_t start_addr,
@@ -151,31 +151,31 @@ class MinidumpGenerator {
MDMemoryDescriptor *stack_location);
bool WriteContextARM(breakpad_thread_state_data_t state,
MDLocationDescriptor *register_location);
- u_int64_t CurrentPCForStackARM(breakpad_thread_state_data_t state);
+ uint64_t CurrentPCForStackARM(breakpad_thread_state_data_t state);
#endif
#ifdef HAS_PPC_SUPPORT
bool WriteStackPPC(breakpad_thread_state_data_t state,
MDMemoryDescriptor *stack_location);
bool WriteContextPPC(breakpad_thread_state_data_t state,
MDLocationDescriptor *register_location);
- u_int64_t CurrentPCForStackPPC(breakpad_thread_state_data_t state);
+ uint64_t CurrentPCForStackPPC(breakpad_thread_state_data_t state);
bool WriteStackPPC64(breakpad_thread_state_data_t state,
MDMemoryDescriptor *stack_location);
bool WriteContextPPC64(breakpad_thread_state_data_t state,
MDLocationDescriptor *register_location);
- u_int64_t CurrentPCForStackPPC64(breakpad_thread_state_data_t state);
+ uint64_t CurrentPCForStackPPC64(breakpad_thread_state_data_t state);
#endif
#ifdef HAS_X86_SUPPORT
bool WriteStackX86(breakpad_thread_state_data_t state,
MDMemoryDescriptor *stack_location);
bool WriteContextX86(breakpad_thread_state_data_t state,
MDLocationDescriptor *register_location);
- u_int64_t CurrentPCForStackX86(breakpad_thread_state_data_t state);
+ uint64_t CurrentPCForStackX86(breakpad_thread_state_data_t state);
bool WriteStackX86_64(breakpad_thread_state_data_t state,
MDMemoryDescriptor *stack_location);
bool WriteContextX86_64(breakpad_thread_state_data_t state,
MDLocationDescriptor *register_location);
- u_int64_t CurrentPCForStackX86_64(breakpad_thread_state_data_t state);
+ uint64_t CurrentPCForStackX86_64(breakpad_thread_state_data_t state);
#endif
// disallow copy ctor and operator=
diff --git a/src/client/mac/tests/crash_generation_server_test.cc b/src/client/mac/tests/crash_generation_server_test.cc
index ff8ff78d..0164f4a2 100644
--- a/src/client/mac/tests/crash_generation_server_test.cc
+++ b/src/client/mac/tests/crash_generation_server_test.cc
@@ -318,7 +318,7 @@ const MDCPUArchitecture kExpectedArchitecture =
MD_CPU_ARCHITECTURE_AMD64
#endif
;
-const u_int32_t kExpectedContext =
+const uint32_t kExpectedContext =
#if defined(__i386__)
MD_CONTEXT_AMD64
#elif defined(__x86_64__)
diff --git a/src/client/mac/tests/exception_handler_test.cc b/src/client/mac/tests/exception_handler_test.cc
index 8325d44e..d108d432 100644
--- a/src/client/mac/tests/exception_handler_test.cc
+++ b/src/client/mac/tests/exception_handler_test.cc
@@ -277,7 +277,7 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemory) {
// These are defined here so the parent can use them to check the
// data from the minidump afterwards.
- const u_int32_t kMemorySize = 256; // bytes
+ const uint32_t kMemorySize = 256; // bytes
const int kOffset = kMemorySize / 2;
// This crashes with SIGILL on x86/x86-64/arm.
const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff };
@@ -346,7 +346,7 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemory) {
MinidumpContext* context = exception->GetContext();
ASSERT_TRUE(context);
- u_int64_t instruction_pointer;
+ uint64_t instruction_pointer;
ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
@@ -354,11 +354,11 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemory) {
EXPECT_TRUE(region);
EXPECT_EQ(kMemorySize, region->GetSize());
- const u_int8_t* bytes = region->GetMemory();
+ const uint8_t* bytes = region->GetMemory();
ASSERT_TRUE(bytes);
- u_int8_t prefix_bytes[kOffset];
- u_int8_t suffix_bytes[kMemorySize - kOffset - sizeof(instructions)];
+ uint8_t prefix_bytes[kOffset];
+ uint8_t suffix_bytes[kMemorySize - kOffset - sizeof(instructions)];
memset(prefix_bytes, 0, sizeof(prefix_bytes));
memset(suffix_bytes, 0, sizeof(suffix_bytes));
EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0);
@@ -376,7 +376,7 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemoryMinBound) {
// These are defined here so the parent can use them to check the
// data from the minidump afterwards.
- const u_int32_t kMemorySize = 256; // bytes
+ const uint32_t kMemorySize = 256; // bytes
const int kOffset = 0;
// This crashes with SIGILL on x86/x86-64/arm.
const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff };
@@ -445,7 +445,7 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemoryMinBound) {
MinidumpContext* context = exception->GetContext();
ASSERT_TRUE(context);
- u_int64_t instruction_pointer;
+ uint64_t instruction_pointer;
ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
@@ -453,10 +453,10 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemoryMinBound) {
EXPECT_TRUE(region);
EXPECT_EQ(kMemorySize / 2, region->GetSize());
- const u_int8_t* bytes = region->GetMemory();
+ const uint8_t* bytes = region->GetMemory();
ASSERT_TRUE(bytes);
- u_int8_t suffix_bytes[kMemorySize / 2 - sizeof(instructions)];
+ uint8_t suffix_bytes[kMemorySize / 2 - sizeof(instructions)];
memset(suffix_bytes, 0, sizeof(suffix_bytes));
EXPECT_TRUE(memcmp(bytes + kOffset, instructions, sizeof(instructions)) == 0);
EXPECT_TRUE(memcmp(bytes + kOffset + sizeof(instructions),
@@ -475,7 +475,7 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) {
// Use 4k here because the OS will hand out a single page even
// if a smaller size is requested, and this test wants to
// test the upper bound of the memory range.
- const u_int32_t kMemorySize = 4096; // bytes
+ const uint32_t kMemorySize = 4096; // bytes
// This crashes with SIGILL on x86/x86-64/arm.
const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff };
const int kOffset = kMemorySize - sizeof(instructions);
@@ -544,7 +544,7 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) {
MinidumpContext* context = exception->GetContext();
ASSERT_TRUE(context);
- u_int64_t instruction_pointer;
+ uint64_t instruction_pointer;
ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
@@ -553,10 +553,10 @@ TEST_F(ExceptionHandlerTest, InstructionPointerMemoryMaxBound) {
const size_t kPrefixSize = 128; // bytes
EXPECT_EQ(kPrefixSize + sizeof(instructions), region->GetSize());
- const u_int8_t* bytes = region->GetMemory();
+ const uint8_t* bytes = region->GetMemory();
ASSERT_TRUE(bytes);
- u_int8_t prefix_bytes[kPrefixSize];
+ uint8_t prefix_bytes[kPrefixSize];
memset(prefix_bytes, 0, sizeof(prefix_bytes));
EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0);
EXPECT_TRUE(memcmp(bytes + kPrefixSize,
diff --git a/src/client/mac/tests/minidump_generator_test.cc b/src/client/mac/tests/minidump_generator_test.cc
index b3f8f0a1..d40c7d98 100644
--- a/src/client/mac/tests/minidump_generator_test.cc
+++ b/src/client/mac/tests/minidump_generator_test.cc
@@ -280,7 +280,7 @@ const MDCPUArchitecture kExpectedArchitecture =
MD_CPU_ARCHITECTURE_AMD64
#endif
;
-const u_int32_t kExpectedContext =
+const uint32_t kExpectedContext =
#if defined(__i386__)
MD_CONTEXT_AMD64
#elif defined(__x86_64__)
diff --git a/src/client/mac/tests/spawn_child_process.h b/src/client/mac/tests/spawn_child_process.h
index bdd293b1..e52ff6b6 100644
--- a/src/client/mac/tests/spawn_child_process.h
+++ b/src/client/mac/tests/spawn_child_process.h
@@ -65,7 +65,7 @@ const MDCPUArchitecture kNativeArchitecture =
#endif
;
-const u_int32_t kNativeContext =
+const uint32_t kNativeContext =
#if defined(__i386__)
MD_CONTEXT_X86
#elif defined(__x86_64__)
diff --git a/src/client/minidump_file_writer.cc b/src/client/minidump_file_writer.cc
index c2674103..1e18d24b 100644
--- a/src/client/minidump_file_writer.cc
+++ b/src/client/minidump_file_writer.cc
@@ -99,11 +99,11 @@ bool MinidumpFileWriter::CopyStringToMDString(const wchar_t *str,
unsigned int length,
TypedMDRVA<MDString> *mdstring) {
bool result = true;
- if (sizeof(wchar_t) == sizeof(u_int16_t)) {
+ if (sizeof(wchar_t) == sizeof(uint16_t)) {
// Shortcut if wchar_t is the same size as MDString's buffer
result = mdstring->Copy(str, mdstring->get()->length);
} else {
- u_int16_t out[2];
+ uint16_t out[2];
int out_idx = 0;
// Copy the string character by character
@@ -120,7 +120,7 @@ bool MinidumpFileWriter::CopyStringToMDString(const wchar_t *str,
// zero, but the second one may be zero, depending on the conversion from
// UTF-32.
int out_count = out[1] ? 2 : 1;
- size_t out_size = sizeof(u_int16_t) * out_count;
+ size_t out_size = sizeof(uint16_t) * out_count;
result = mdstring->CopyIndexAfterObject(out_idx, out, out_size);
out_idx += out_count;
}
@@ -132,7 +132,7 @@ bool MinidumpFileWriter::CopyStringToMDString(const char *str,
unsigned int length,
TypedMDRVA<MDString> *mdstring) {
bool result = true;
- u_int16_t out[2];
+ uint16_t out[2];
int out_idx = 0;
// Copy the string character by character
@@ -147,7 +147,7 @@ bool MinidumpFileWriter::CopyStringToMDString(const char *str,
// Append the one or two UTF-16 characters
int out_count = out[1] ? 2 : 1;
- size_t out_size = sizeof(u_int16_t) * out_count;
+ size_t out_size = sizeof(uint16_t) * out_count;
result = mdstring->CopyIndexAfterObject(out_idx, out, out_size);
out_idx += out_count;
}
@@ -170,17 +170,17 @@ bool MinidumpFileWriter::WriteStringCore(const CharType *str,
// Allocate the string buffer
TypedMDRVA<MDString> mdstring(this);
- if (!mdstring.AllocateObjectAndArray(mdstring_length + 1, sizeof(u_int16_t)))
+ if (!mdstring.AllocateObjectAndArray(mdstring_length + 1, sizeof(uint16_t)))
return false;
// Set length excluding the NULL and copy the string
mdstring.get()->length =
- static_cast<u_int32_t>(mdstring_length * sizeof(u_int16_t));
+ static_cast<uint32_t>(mdstring_length * sizeof(uint16_t));
bool result = CopyStringToMDString(str, mdstring_length, &mdstring);
// NULL terminate
if (result) {
- u_int16_t ch = 0;
+ uint16_t ch = 0;
result = mdstring.CopyIndexAfterObject(mdstring_length, &ch, sizeof(ch));
if (result)
@@ -211,7 +211,7 @@ bool MinidumpFileWriter::WriteMemory(const void *src, size_t size,
if (!mem.Copy(src, mem.size()))
return false;
- output->start_of_memory_range = reinterpret_cast<u_int64_t>(src);
+ output->start_of_memory_range = reinterpret_cast<uint64_t>(src);
output->memory = mem.location();
return true;
diff --git a/src/client/minidump_file_writer.h b/src/client/minidump_file_writer.h
index 313b250b..538e8545 100644
--- a/src/client/minidump_file_writer.h
+++ b/src/client/minidump_file_writer.h
@@ -172,7 +172,7 @@ class UntypedMDRVA {
// Return size and position
inline MDLocationDescriptor location() const {
- MDLocationDescriptor location = { static_cast<u_int32_t>(size_),
+ MDLocationDescriptor location = { static_cast<uint32_t>(size_),
position_ };
return location;
}
diff --git a/src/client/solaris/handler/minidump_generator.cc b/src/client/solaris/handler/minidump_generator.cc
index ea046cff..7485025f 100644
--- a/src/client/solaris/handler/minidump_generator.cc
+++ b/src/client/solaris/handler/minidump_generator.cc
@@ -455,7 +455,7 @@ bool WriteCVRecord(MinidumpFileWriter *minidump_writer,
snprintf(path, sizeof(path), "/proc/self/object/%s", module_name);
size_t module_name_length = strlen(realname);
- if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(u_int8_t)))
+ if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(uint8_t)))
return false;
if (!cv.CopyIndexAfterObject(0, realname, module_name_length))
return false;
@@ -522,7 +522,7 @@ bool ModuleInfoCallback(const ModuleInfo &module_info, void *context) {
if (!callback_context->minidump_writer->WriteString(realname, 0, &loc))
return false;
- module.base_of_image = (u_int64_t)module_info.start_addr;
+ module.base_of_image = (uint64_t)module_info.start_addr;
module.size_of_image = module_info.size;
module.module_name_rva = loc.rva;
diff --git a/src/client/windows/crash_generation/minidump_generator.h b/src/client/windows/crash_generation/minidump_generator.h
index 5f9e4b54..5a1aea0d 100644..100755
--- a/src/client/windows/crash_generation/minidump_generator.h
+++ b/src/client/windows/crash_generation/minidump_generator.h
@@ -32,6 +32,7 @@
#include <windows.h>
#include <dbghelp.h>
+#include <rpc.h>
#include <list>
#include "google_breakpad/common/minidump_format.h"
diff --git a/src/client/windows/unittests/exception_handler_death_test.cc b/src/client/windows/unittests/exception_handler_death_test.cc
index 9d6acbc9..c4cb9930 100644
--- a/src/client/windows/unittests/exception_handler_death_test.cc
+++ b/src/client/windows/unittests/exception_handler_death_test.cc
@@ -265,7 +265,7 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemory) {
testing::DisableExceptionHandlerInScope disable_exception_handler;
// Get some executable memory.
- const u_int32_t kMemorySize = 256; // bytes
+ const uint32_t kMemorySize = 256; // bytes
const int kOffset = kMemorySize / 2;
// This crashes with SIGILL on x86/x86-64/arm.
const unsigned char instructions[] = { 0xff, 0xff, 0xff, 0xff };
@@ -314,7 +314,7 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemory) {
MinidumpContext* context = exception->GetContext();
ASSERT_TRUE(context);
- u_int64_t instruction_pointer;
+ uint64_t instruction_pointer;
ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
@@ -322,11 +322,11 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemory) {
ASSERT_TRUE(region);
EXPECT_EQ(kMemorySize, region->GetSize());
- const u_int8_t* bytes = region->GetMemory();
+ const uint8_t* bytes = region->GetMemory();
ASSERT_TRUE(bytes);
- u_int8_t prefix_bytes[kOffset];
- u_int8_t suffix_bytes[kMemorySize - kOffset - sizeof(instructions)];
+ uint8_t prefix_bytes[kOffset];
+ uint8_t suffix_bytes[kMemorySize - kOffset - sizeof(instructions)];
memset(prefix_bytes, 0, sizeof(prefix_bytes));
memset(suffix_bytes, 0, sizeof(suffix_bytes));
EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0);
@@ -352,7 +352,7 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemoryMinBound) {
SYSTEM_INFO sSysInfo; // Useful information about the system
GetSystemInfo(&sSysInfo); // Initialize the structure.
- const u_int32_t kMemorySize = 256; // bytes
+ const uint32_t kMemorySize = 256; // bytes
const DWORD kPageSize = sSysInfo.dwPageSize;
const int kOffset = 0;
// This crashes with SIGILL on x86/x86-64/arm.
@@ -407,7 +407,7 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemoryMinBound) {
MinidumpContext* context = exception->GetContext();
ASSERT_TRUE(context);
- u_int64_t instruction_pointer;
+ uint64_t instruction_pointer;
ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
@@ -415,10 +415,10 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemoryMinBound) {
ASSERT_TRUE(region);
EXPECT_EQ(kMemorySize / 2, region->GetSize());
- const u_int8_t* bytes = region->GetMemory();
+ const uint8_t* bytes = region->GetMemory();
ASSERT_TRUE(bytes);
- u_int8_t suffix_bytes[kMemorySize / 2 - sizeof(instructions)];
+ uint8_t suffix_bytes[kMemorySize / 2 - sizeof(instructions)];
memset(suffix_bytes, 0, sizeof(suffix_bytes));
EXPECT_TRUE(memcmp(bytes + kOffset,
instructions, sizeof(instructions)) == 0);
@@ -492,7 +492,7 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemoryMaxBound) {
MinidumpContext* context = exception->GetContext();
ASSERT_TRUE(context);
- u_int64_t instruction_pointer;
+ uint64_t instruction_pointer;
ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
@@ -501,10 +501,10 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemoryMaxBound) {
const size_t kPrefixSize = 128; // bytes
EXPECT_EQ(kPrefixSize + sizeof(instructions), region->GetSize());
- const u_int8_t* bytes = region->GetMemory();
+ const uint8_t* bytes = region->GetMemory();
ASSERT_TRUE(bytes);
- u_int8_t prefix_bytes[kPrefixSize];
+ uint8_t prefix_bytes[kPrefixSize];
memset(prefix_bytes, 0, sizeof(prefix_bytes));
EXPECT_TRUE(memcmp(bytes, prefix_bytes, sizeof(prefix_bytes)) == 0);
EXPECT_TRUE(memcmp(bytes + kPrefixSize,
diff --git a/src/client/windows/unittests/exception_handler_test.cc b/src/client/windows/unittests/exception_handler_test.cc
index be9397b8..7b50e301 100644
--- a/src/client/windows/unittests/exception_handler_test.cc
+++ b/src/client/windows/unittests/exception_handler_test.cc
@@ -397,15 +397,15 @@ TEST_F(ExceptionHandlerTest, WriteMinidumpTest) {
TEST_F(ExceptionHandlerTest, AdditionalMemory) {
SYSTEM_INFO si;
GetSystemInfo(&si);
- const u_int32_t kMemorySize = si.dwPageSize;
+ const uint32_t kMemorySize = si.dwPageSize;
// 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;
}
@@ -451,15 +451,15 @@ TEST_F(ExceptionHandlerTest, AdditionalMemory) {
TEST_F(ExceptionHandlerTest, AdditionalMemoryRemove) {
SYSTEM_INFO si;
GetSystemInfo(&si);
- const u_int32_t kMemorySize = si.dwPageSize;
+ const uint32_t kMemorySize = si.dwPageSize;
// 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;
}