diff options
| author | Morph <39850852+Morph1984@users.noreply.github.com> | 2022-06-01 20:46:10 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-01 20:46:10 -0400 |
| commit | a08c0ca9c3140f2d2af44dffb7bae0ce565bcfdb (patch) | |
| tree | 26d5733fe69193e76402bad78b1a3a8b791b6095 /src/core/hle | |
| parent | 79fa280adc1d5023439e27471b070153d2bc65e6 (diff) | |
| parent | da50e98e3ad28887f0bddb7c119343a4f28c4977 (diff) | |
Merge pull request #8402 from liamwhite/better-step
core/debugger: Improved stepping mechanism and misc fixes
Diffstat (limited to 'src/core/hle')
| -rw-r--r-- | src/core/hle/kernel/k_thread.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_thread.h b/src/core/hle/kernel/k_thread.h index b55a922abd..60ae0da78e 100644 --- a/src/core/hle/kernel/k_thread.h +++ b/src/core/hle/kernel/k_thread.h @@ -100,6 +100,12 @@ enum class ThreadWaitReasonForDebugging : u32 { Suspended, ///< Thread is waiting due to process suspension }; +enum class StepState : u32 { + NotStepping, ///< Thread is not currently stepping + StepPending, ///< Thread will step when next scheduled + StepPerformed, ///< Thread has stepped, waiting to be scheduled again +}; + [[nodiscard]] KThread* GetCurrentThreadPointer(KernelCore& kernel); [[nodiscard]] KThread& GetCurrentThread(KernelCore& kernel); [[nodiscard]] s32 GetCurrentCoreId(KernelCore& kernel); @@ -267,6 +273,14 @@ public: void SetState(ThreadState state); + [[nodiscard]] StepState GetStepState() const { + return step_state; + } + + void SetStepState(StepState state) { + step_state = state; + } + [[nodiscard]] s64 GetLastScheduledTick() const { return last_scheduled_tick; } @@ -769,6 +783,7 @@ private: std::shared_ptr<Common::Fiber> host_context{}; bool is_single_core{}; ThreadType thread_type{}; + StepState step_state{}; std::mutex dummy_wait_lock; std::condition_variable dummy_wait_cv; |
