diff options
author | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-03-06 14:04:42 +0000 |
---|---|---|
committer | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-03-06 14:04:42 +0000 |
commit | aeffe1056f9ff6526d87a16ef55222899f5528f7 (patch) | |
tree | 1b7601a9135f82c14e73535c9d4a24f94d494662 /src/client/windows | |
parent | Work around Windows headers #defining ERROR by renaming enum values in StackF... (diff) | |
download | breakpad-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/windows')
-rwxr-xr-x[-rw-r--r--] | src/client/windows/crash_generation/minidump_generator.h | 1 | ||||
-rw-r--r-- | src/client/windows/unittests/exception_handler_death_test.cc | 24 | ||||
-rw-r--r-- | src/client/windows/unittests/exception_handler_test.cc | 12 |
3 files changed, 19 insertions, 18 deletions
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; } |