diff options
Diffstat (limited to 'src/client/windows')
-rw-r--r-- | src/client/windows/unittests/exception_handler_death_test.cc | 36 |
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); |