diff options
author | Somebody Whoisbored <13044396+shadowninja108@users.noreply.github.com> | 2021-05-20 16:27:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-21 01:27:16 +0200 |
commit | 26e5b5acffa28c7fc9b6d13612ef5077fa35c971 (patch) | |
tree | cd62311f98d0da1698889d22d3a4a7a27eccd07b /Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs | |
parent | 2c3dab69860e8a7b23cfaba603b3bb31b75a168b (diff) |
Extend info printed when guest crashes/breaks execution (#1845)
* Add CPU register printout when guest crashes/breaks execution
* Print out registers when undefined instruction is hit
* Apply suggestions from code review
Co-authored-by: Ac_K <Acoustik666@gmail.com>
* Fixes after rebase
* Address gdkchan's comments
Co-authored-by: Ac_K <Acoustik666@gmail.com>
Co-authored-by: Mary <me@thog.eu>
Diffstat (limited to 'Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs')
-rw-r--r-- | Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs b/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs index 7ba9e43a..3ea03f16 100644 --- a/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs +++ b/Ryujinx.HLE/HOS/Kernel/Threading/KThread.cs @@ -991,7 +991,12 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading public string GetGuestStackTrace() { - return Owner.Debugger.GetGuestStackTrace(Context); + return Owner.Debugger.GetGuestStackTrace(this); + } + + public string GetGuestRegisterPrintout() + { + return Owner.Debugger.GetCpuRegisterPrintout(this); } public void PrintGuestStackTrace() @@ -999,6 +1004,11 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading Logger.Info?.Print(LogClass.Cpu, $"Guest stack trace:\n{GetGuestStackTrace()}\n"); } + public void PrintGuestRegisterPrintout() + { + Logger.Info?.Print(LogClass.Cpu, $"Guest CPU registers:\n{GetGuestRegisterPrintout()}\n"); + } + public void AddCpuTime(long ticks) { Interlocked.Add(ref _totalTimeRunning, ticks); |