diff options
| author | 2022-05-31 14:37:37 -0400 | |
|---|---|---|
| committer | 2022-06-01 02:15:15 -0400 | |
| commit | 989d4a7a41f449af0ea09e34bee331a3a3ac8170 (patch) | |
| tree | df24bd9d7e6942b939e3ea42d08c0d65006e539f /src/core/arm/arm_interface.h | |
| parent | core/debugger: Implement new GDB stub debugger (diff) | |
| download | yuzu-989d4a7a41f449af0ea09e34bee331a3a3ac8170.tar.gz yuzu-989d4a7a41f449af0ea09e34bee331a3a3ac8170.tar.xz yuzu-989d4a7a41f449af0ea09e34bee331a3a3ac8170.zip | |
core/debugger: Improved stepping mechanism and misc fixes
Diffstat (limited to 'src/core/arm/arm_interface.h')
| -rw-r--r-- | src/core/arm/arm_interface.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 7842c626b..66f6107e9 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h | |||
| @@ -6,6 +6,9 @@ | |||
| 6 | 6 | ||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include <vector> | 8 | #include <vector> |
| 9 | |||
| 10 | #include <dynarmic/interface/halt_reason.h> | ||
| 11 | |||
| 9 | #include "common/common_funcs.h" | 12 | #include "common/common_funcs.h" |
| 10 | #include "common/common_types.h" | 13 | #include "common/common_types.h" |
| 11 | #include "core/hardware_properties.h" | 14 | #include "core/hardware_properties.h" |
| @@ -64,7 +67,7 @@ public: | |||
| 64 | static_assert(sizeof(ThreadContext64) == 0x320); | 67 | static_assert(sizeof(ThreadContext64) == 0x320); |
| 65 | 68 | ||
| 66 | /// Runs the CPU until an event happens | 69 | /// Runs the CPU until an event happens |
| 67 | virtual void Run() = 0; | 70 | void Run(); |
| 68 | 71 | ||
| 69 | /// Clear all instruction cache | 72 | /// Clear all instruction cache |
| 70 | virtual void ClearInstructionCache() = 0; | 73 | virtual void ClearInstructionCache() = 0; |
| @@ -191,7 +194,10 @@ public: | |||
| 191 | 194 | ||
| 192 | void LogBacktrace() const; | 195 | void LogBacktrace() const; |
| 193 | 196 | ||
| 194 | bool ShouldStep() const; | 197 | static constexpr Dynarmic::HaltReason step_thread = Dynarmic::HaltReason::Step; |
| 198 | static constexpr Dynarmic::HaltReason break_loop = Dynarmic::HaltReason::UserDefined2; | ||
| 199 | static constexpr Dynarmic::HaltReason svc_call = Dynarmic::HaltReason::UserDefined3; | ||
| 200 | static constexpr Dynarmic::HaltReason breakpoint = Dynarmic::HaltReason::UserDefined4; | ||
| 195 | 201 | ||
| 196 | protected: | 202 | protected: |
| 197 | /// System context that this ARM interface is running under. | 203 | /// System context that this ARM interface is running under. |
| @@ -200,6 +206,10 @@ protected: | |||
| 200 | bool uses_wall_clock; | 206 | bool uses_wall_clock; |
| 201 | 207 | ||
| 202 | static void SymbolicateBacktrace(Core::System& system, std::vector<BacktraceEntry>& out); | 208 | static void SymbolicateBacktrace(Core::System& system, std::vector<BacktraceEntry>& out); |
| 209 | |||
| 210 | virtual Dynarmic::HaltReason RunJit() = 0; | ||
| 211 | virtual Dynarmic::HaltReason StepJit() = 0; | ||
| 212 | virtual u32 GetSvcNumber() const = 0; | ||
| 203 | }; | 213 | }; |
| 204 | 214 | ||
| 205 | } // namespace Core | 215 | } // namespace Core |