aboutsummaryrefslogtreecommitdiff
path: root/src/client/windows/unittests
diff options
context:
space:
mode:
authorted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-09-17 14:01:28 +0000
committerted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-09-17 14:01:28 +0000
commit52935b4e812f413beaf294b24e5677c0324f98b6 (patch)
tree69bafaa55473940b8568f001ea068fde445a5452 /src/client/windows/unittests
parentMake my_str_len/my_itos take uintmax_t (diff)
downloadbreakpad-52935b4e812f413beaf294b24e5677c0324f98b6.tar.xz
Add a GetInstructionPointer method to MinidumpException
R=mark at https://breakpad.appspot.com/444003/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1039 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/windows/unittests')
-rw-r--r--src/client/windows/unittests/exception_handler_death_test.cc36
1 files changed, 3 insertions, 33 deletions
diff --git a/src/client/windows/unittests/exception_handler_death_test.cc b/src/client/windows/unittests/exception_handler_death_test.cc
index 514ee72a..a50f9134 100644
--- a/src/client/windows/unittests/exception_handler_death_test.cc
+++ b/src/client/windows/unittests/exception_handler_death_test.cc
@@ -303,17 +303,7 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemory) {
ASSERT_TRUE(context);
u_int64_t instruction_pointer;
- switch (context->GetContextCPU()) {
- case MD_CONTEXT_X86:
- instruction_pointer = context->GetContextX86()->eip;
- break;
- case MD_CONTEXT_AMD64:
- instruction_pointer = context->GetContextAMD64()->rip;
- break;
- default:
- FAIL() << "Unknown context CPU: " << context->GetContextCPU();
- break;
- }
+ ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
memory_list->GetMemoryRegionForAddress(instruction_pointer);
@@ -403,17 +393,7 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemoryMinBound) {
ASSERT_TRUE(context);
u_int64_t instruction_pointer;
- switch (context->GetContextCPU()) {
- case MD_CONTEXT_X86:
- instruction_pointer = context->GetContextX86()->eip;
- break;
- case MD_CONTEXT_AMD64:
- instruction_pointer = context->GetContextAMD64()->rip;
- break;
- default:
- FAIL() << "Unknown context CPU: " << context->GetContextCPU();
- break;
- }
+ ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
memory_list->GetMemoryRegionForAddress(instruction_pointer);
@@ -495,17 +475,7 @@ TEST_F(ExceptionHandlerDeathTest, InstructionPointerMemoryMaxBound) {
ASSERT_TRUE(context);
u_int64_t instruction_pointer;
- switch (context->GetContextCPU()) {
- case MD_CONTEXT_X86:
- instruction_pointer = context->GetContextX86()->eip;
- break;
- case MD_CONTEXT_AMD64:
- instruction_pointer = context->GetContextAMD64()->rip;
- break;
- default:
- FAIL() << "Unknown context CPU: " << context->GetContextCPU();
- break;
- }
+ ASSERT_TRUE(context->GetInstructionPointer(&instruction_pointer));
MinidumpMemoryRegion* region =
memory_list->GetMemoryRegionForAddress(instruction_pointer);