summaryrefslogtreecommitdiff
path: root/src/core/arm/arm_interface.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/arm/arm_interface.h')
-rw-r--r--src/core/arm/arm_interface.h18
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:
101 virtual u64 GetPC() const = 0; 101 virtual u64 GetPC() const = 0;
102 102
103 /** 103 /**
104 * Get the current Stack Pointer
105 * @return Returns current SP
106 */
107 virtual u64 GetSP() const = 0;
108
109 /**
104 * Get an ARM register 110 * Get an ARM register
105 * @param index Register index 111 * @param index Register index
106 * @return Returns the value in the register 112 * @return Returns the value in the register
@@ -183,16 +189,12 @@ public:
183 }; 189 };
184 190
185 static std::vector<BacktraceEntry> GetBacktraceFromContext(System& system, 191 static std::vector<BacktraceEntry> GetBacktraceFromContext(System& system,
192 const ThreadContext32& ctx);
193 static std::vector<BacktraceEntry> GetBacktraceFromContext(System& system,
186 const ThreadContext64& ctx); 194 const ThreadContext64& ctx);
187 195
188 std::vector<BacktraceEntry> GetBacktrace() const; 196 virtual std::vector<BacktraceEntry> GetBacktrace() const = 0;
189 197
190 /// fp (= r29) points to the last frame record.
191 /// Note that this is the frame record for the *previous* frame, not the current one.
192 /// Note we need to subtract 4 from our last read to get the proper address
193 /// Frame records are two words long:
194 /// fp+0 : pointer to previous frame record
195 /// fp+8 : value of lr for frame
196 void LogBacktrace() const; 198 void LogBacktrace() const;
197 199
198protected: 200protected:
@@ -200,6 +202,8 @@ protected:
200 System& system; 202 System& system;
201 CPUInterrupts& interrupt_handlers; 203 CPUInterrupts& interrupt_handlers;
202 bool uses_wall_clock; 204 bool uses_wall_clock;
205
206 static void SymbolicateBacktrace(Core::System& system, std::vector<BacktraceEntry>& out);
203}; 207};
204 208
205} // namespace Core 209} // namespace Core