diff options
| author | Mai M <mathew1800@gmail.com> | 2022-04-21 02:51:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-21 02:51:03 -0400 |
| commit | fd409a92473726600a6605d5cfb782c38c3de72d (patch) | |
| tree | 7f1e82d05b97420ee8f652439362774b0f15bc3d /src/core/arm/arm_interface.h | |
| parent | ea07e61d3d6ff553d4a728648a140fe7ca354573 (diff) | |
| parent | 0ca4dff62c61570828ec563d6200ca47b3d02569 (diff) | |
Merge pull request #8232 from liamwhite/backtrace
core/arm: separate backtrace collection
Diffstat (limited to 'src/core/arm/arm_interface.h')
| -rw-r--r-- | src/core/arm/arm_interface.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index dce2f4195..bcec4b3b8 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -101,6 +101,12 @@ public: virtual u64 GetPC() const = 0; /** + * Get the current Stack Pointer + * @return Returns current SP + */ + virtual u64 GetSP() const = 0; + + /** * Get an ARM register * @param index Register index * @return Returns the value in the register @@ -183,16 +189,12 @@ public: }; static std::vector<BacktraceEntry> GetBacktraceFromContext(System& system, + const ThreadContext32& ctx); + static std::vector<BacktraceEntry> GetBacktraceFromContext(System& system, const ThreadContext64& ctx); - std::vector<BacktraceEntry> GetBacktrace() const; + virtual std::vector<BacktraceEntry> GetBacktrace() const = 0; - /// 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 - /// Frame records are two words long: - /// fp+0 : pointer to previous frame record - /// fp+8 : value of lr for frame void LogBacktrace() const; protected: @@ -200,6 +202,8 @@ protected: System& system; CPUInterrupts& interrupt_handlers; bool uses_wall_clock; + + static void SymbolicateBacktrace(Core::System& system, std::vector<BacktraceEntry>& out); }; } // namespace Core |
