Print Guest Stack Trace in ServiceNotImplemented Exception (#650)

* Print Guest Stack Trace in ServiceNotImplemented Exception

* Remove PrintGuestStackTrace

* Print Process Name and PID at the start of guest stack trace
This commit is contained in:
jduncanator 2019-03-15 14:37:54 +11:00 committed by GitHub
parent 1bef70c068
commit efebd8f94d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 76 additions and 47 deletions

View file

@ -1,10 +1,12 @@
using ChocolArm64;
using ChocolArm64.Memory;
using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Kernel.Common;
using Ryujinx.HLE.HOS.Kernel.Process;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Ryujinx.HLE.HOS.Kernel.Threading
{
@ -1009,9 +1011,19 @@ namespace Ryujinx.HLE.HOS.Kernel.Threading
ReleaseAndResume();
}
public string GetGuestStackTrace()
{
return Owner.Debugger.GetGuestStackTrace(Context.ThreadState);
}
public void PrintGuestStackTrace()
{
Owner.Debugger.PrintGuestStackTrace(Context.ThreadState);
StringBuilder trace = new StringBuilder();
trace.AppendLine("Guest stack trace:");
trace.AppendLine(GetGuestStackTrace());
Logger.PrintInfo(LogClass.Cpu, trace.ToString());
}
private void ThreadFinishedHandler(object sender, EventArgs e)