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/UnwindTest.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'libunwindstack/tests/UnwindTest.cpp') diff --git a/libunwindstack/tests/UnwindTest.cpp b/libunwindstack/tests/UnwindTest.cpp index f76a101df2..b11d213f6b 100644 --- a/libunwindstack/tests/UnwindTest.cpp +++ b/libunwindstack/tests/UnwindTest.cpp @@ -170,7 +170,6 @@ extern "C" void InnerFunction(TestTypeEnum test_type) { unwinder.reset(new Unwinder(512, maps.get(), regs.get(), process_memory)); } else { UnwinderFromPid* unwinder_from_pid = new UnwinderFromPid(512, getpid()); - ASSERT_TRUE(unwinder_from_pid->Init(regs->Arch())); unwinder_from_pid->SetRegs(regs.get()); unwinder.reset(unwinder_from_pid); } @@ -283,7 +282,6 @@ TEST_F(UnwindTest, unwind_from_pid_remote) { ASSERT_TRUE(regs.get() != nullptr); UnwinderFromPid unwinder(512, pid); - ASSERT_TRUE(unwinder.Init(regs->Arch())); unwinder.SetRegs(regs.get()); VerifyUnwind(&unwinder, kFunctionOrder); @@ -335,7 +333,6 @@ static void RemoteUnwindFromPid(void* data) { ASSERT_TRUE(regs.get() != nullptr); UnwinderFromPid unwinder(512, *pid); - ASSERT_TRUE(unwinder.Init(regs->Arch())); unwinder.SetRegs(regs.get()); VerifyUnwind(&unwinder, kFunctionOrder); -- cgit v1.2.3