From 5574be21ccd8cf86eaba5c50d30ad898bafc8ea8 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Fri, 17 May 2019 21:43:26 -0400 Subject: arm_interface: Expand backtrace generation Returns results as a vector of entries for further processing. Logs addresses, offsets, and mangled name. --- src/core/arm/arm_interface.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/core/arm/arm_interface.h') diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 978b1518f..c6691a8e1 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -5,6 +5,7 @@ #pragma once #include +#include #include "common/common_types.h" namespace Common { @@ -152,6 +153,16 @@ public: /// Prepare core for thread reschedule (if needed to correctly handle state) virtual void PrepareReschedule() = 0; + struct BacktraceEntry { + std::string module; + u64 address; + u64 original_address; + u64 offset; + std::string name; + }; + + std::vector GetBacktrace() const; + /// fp (= r29) points to the last frame record. /// Note that this is the frame record for the *previous* frame, not the current one. /// Note we need to subtract 4 from our last read to get the proper address -- cgit v1.2.3