From 5102c912569a29259ec26aa254d4598e81205a17 Mon Sep 17 00:00:00 2001 From: David Marcec Date: Mon, 3 Dec 2018 20:13:48 +1100 Subject: Moved backtrace to ArmInterface Added to both dynarmic and unicorn --- src/core/hle/kernel/thread.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'src/core/hle') diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index a044db6e7..a276812f0 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -389,20 +389,7 @@ bool Thread::InvokeWakeupCallback(ThreadWakeupReason reason, SharedPtr t } void Thread::LogBacktrace() { - auto& system = Core::System::GetInstance(); - VAddr fp = system.ArmInterface(processor_id).GetReg(29); - VAddr lr = system.ArmInterface(processor_id).GetReg(30); - VAddr sp = system.ArmInterface(processor_id).GetReg(13); - VAddr pc = system.ArmInterface(processor_id).GetPC(); - LOG_ERROR(Debug, "Backtrace, sp={:016X}, pc={:016X}", sp, pc); - for (std::size_t i = 0; i < 256; i++) { - LOG_ERROR(Debug, "{:016X}", lr - 4); - if (!fp) { - break; - } - lr = Memory::Read64(fp + 8); - fp = Memory::Read64(fp); - } + Core::System::GetInstance().ArmInterface(processor_id).LogBacktrace(); } //////////////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3