arm_interface: Expand backtrace generation

Returns results as a vector of entries for further processing. Logs addresses, offsets, and mangled name.
This commit is contained in:
Zach Hilman 2019-05-17 21:43:26 -04:00
parent 2179ad7483
commit 5574be21cc
2 changed files with 194 additions and 7 deletions

View file

@ -5,6 +5,7 @@
#pragma once
#include <array>
#include <vector>
#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<BacktraceEntry> 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