diff options
| author | 2019-05-17 21:43:26 -0400 | |
|---|---|---|
| committer | 2019-05-25 16:06:53 -0400 | |
| commit | 5574be21ccd8cf86eaba5c50d30ad898bafc8ea8 (patch) | |
| tree | 08dab8c037370c284f46b56335d9b7d8e68ce839 /src/core/arm/arm_interface.h | |
| parent | core: Track load offsets of NSO modules (diff) | |
| download | yuzu-5574be21ccd8cf86eaba5c50d30ad898bafc8ea8.tar.gz yuzu-5574be21ccd8cf86eaba5c50d30ad898bafc8ea8.tar.xz yuzu-5574be21ccd8cf86eaba5c50d30ad898bafc8ea8.zip | |
arm_interface: Expand backtrace generation
Returns results as a vector of entries for further processing. Logs addresses, offsets, and mangled name.
Diffstat (limited to 'src/core/arm/arm_interface.h')
| -rw-r--r-- | src/core/arm/arm_interface.h | 11 |
1 files changed, 11 insertions, 0 deletions
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 @@ | |||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include <vector> | ||
| 8 | #include "common/common_types.h" | 9 | #include "common/common_types.h" |
| 9 | 10 | ||
| 10 | namespace Common { | 11 | namespace Common { |
| @@ -152,6 +153,16 @@ public: | |||
| 152 | /// Prepare core for thread reschedule (if needed to correctly handle state) | 153 | /// Prepare core for thread reschedule (if needed to correctly handle state) |
| 153 | virtual void PrepareReschedule() = 0; | 154 | virtual void PrepareReschedule() = 0; |
| 154 | 155 | ||
| 156 | struct BacktraceEntry { | ||
| 157 | std::string module; | ||
| 158 | u64 address; | ||
| 159 | u64 original_address; | ||
| 160 | u64 offset; | ||
| 161 | std::string name; | ||
| 162 | }; | ||
| 163 | |||
| 164 | std::vector<BacktraceEntry> GetBacktrace() const; | ||
| 165 | |||
| 155 | /// fp (= r29) points to the last frame record. | 166 | /// fp (= r29) points to the last frame record. |
| 156 | /// Note that this is the frame record for the *previous* frame, not the current one. | 167 | /// Note that this is the frame record for the *previous* frame, not the current one. |
| 157 | /// Note we need to subtract 4 from our last read to get the proper address | 168 | /// Note we need to subtract 4 from our last read to get the proper address |