From b05c472421d9d4dd919926c95a5c1de4eb9a721a Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Wed, 23 Sep 2020 15:51:46 -0700 Subject: Add arch member into Unwinder object. This simplifies some of the logic and removes the need to pass an Arch value to functions that should already know about the arch it is operating on. Includes fixes for debuggerd/libbacktrace. Added new unit tests to cover new cases. Test: All unit tests pass. Test: Faked unwinder failing to verify debuggerd error messages display Test: properly in backtrace and tombstone. Change-Id: I439fcae0695befcfb1cb4c0a786cc74949d33425 --- libunwindstack/tests/UnwindOfflineTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libunwindstack/tests/UnwindOfflineTest.cpp') diff --git a/libunwindstack/tests/UnwindOfflineTest.cpp b/libunwindstack/tests/UnwindOfflineTest.cpp index c2bd8363c7..0c6f9f8caf 100644 --- a/libunwindstack/tests/UnwindOfflineTest.cpp +++ b/libunwindstack/tests/UnwindOfflineTest.cpp @@ -314,7 +314,7 @@ TEST_F(UnwindOfflineTest, jit_debug_x86) { JitDebug jit_debug(process_memory_); Unwinder unwinder(128, maps_.get(), regs_.get(), process_memory_); - unwinder.SetJitDebug(&jit_debug, regs_->Arch()); + unwinder.SetJitDebug(&jit_debug); unwinder.Unwind(); std::string frame_info(DumpFrames(unwinder)); @@ -616,7 +616,7 @@ TEST_F(UnwindOfflineTest, jit_debug_arm) { JitDebug jit_debug(process_memory_); Unwinder unwinder(128, maps_.get(), regs_.get(), process_memory_); - unwinder.SetJitDebug(&jit_debug, regs_->Arch()); + unwinder.SetJitDebug(&jit_debug); unwinder.Unwind(); std::string frame_info(DumpFrames(unwinder)); @@ -939,7 +939,7 @@ static void OfflineUnwind(void* data) { std::unique_ptr regs_copy(leak_data->regs->Clone()); JitDebug jit_debug(leak_data->process_memory); Unwinder unwinder(128, leak_data->maps, regs_copy.get(), leak_data->process_memory); - unwinder.SetJitDebug(&jit_debug, regs_copy->Arch()); + unwinder.SetJitDebug(&jit_debug); unwinder.Unwind(); ASSERT_EQ(76U, unwinder.NumFrames()); } @@ -1062,7 +1062,7 @@ TEST_F(UnwindOfflineTest, art_quick_osr_stub_arm) { JitDebug jit_debug(process_memory_); Unwinder unwinder(128, maps_.get(), regs_.get(), process_memory_); - unwinder.SetJitDebug(&jit_debug, regs_->Arch()); + unwinder.SetJitDebug(&jit_debug); unwinder.Unwind(); std::string frame_info(DumpFrames(unwinder)); -- cgit v1.2.3