diff options
author | jduncanator <1518948+jduncanator@users.noreply.github.com> | 2019-03-15 14:37:54 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-15 14:37:54 +1100 |
commit | efebd8f94de03ef5cab63803f0cf37fc39258682 (patch) | |
tree | 57f7a6711c27290d3d0a00a918bdb965816eaf75 /Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs | |
parent | 1bef70c068f8aeb6a3a518b8ca635de19122da14 (diff) |
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
Diffstat (limited to 'Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs')
-rw-r--r-- | Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs | 82 |
1 files changed, 46 insertions, 36 deletions
diff --git a/Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs b/Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs index d5ea3bbf..893ce26e 100644 --- a/Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs +++ b/Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs @@ -76,60 +76,70 @@ namespace Ryujinx.HLE.Exceptions } } - // Print buffer information - sb.AppendLine("Buffer Information"); + sb.AppendLine("Guest Stack Trace:"); + sb.AppendLine(Context.Thread.GetGuestStackTrace()); - if (Request.PtrBuff.Count > 0) + // Print buffer information + if (Request.PtrBuff.Count > 0 || + Request.SendBuff.Count > 0 || + Request.ReceiveBuff.Count > 0 || + Request.ExchangeBuff.Count > 0 || + Request.RecvListBuff.Count > 0) { - sb.AppendLine("\tPtrBuff:"); + sb.AppendLine("Buffer Information:"); - foreach (var buff in Request.PtrBuff) + if (Request.PtrBuff.Count > 0) { - sb.AppendLine($"\t[{buff.Index}] Position: 0x{buff.Position:x16} Size: 0x{buff.Size:x16}"); - } - } + sb.AppendLine("\tPtrBuff:"); - if (Request.SendBuff.Count > 0) - { - sb.AppendLine("\tSendBuff:"); + foreach (var buff in Request.PtrBuff) + { + sb.AppendLine($"\t[{buff.Index}] Position: 0x{buff.Position:x16} Size: 0x{buff.Size:x16}"); + } + } - foreach (var buff in Request.SendBuff) + if (Request.SendBuff.Count > 0) { - sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16} Flags: {buff.Flags}"); - } - } + sb.AppendLine("\tSendBuff:"); - if (Request.ReceiveBuff.Count > 0) - { - sb.AppendLine("\tReceiveBuff:"); + foreach (var buff in Request.SendBuff) + { + sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16} Flags: {buff.Flags}"); + } + } - foreach (var buff in Request.ReceiveBuff) + if (Request.ReceiveBuff.Count > 0) { - sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16} Flags: {buff.Flags}"); - } - } + sb.AppendLine("\tReceiveBuff:"); - if (Request.ExchangeBuff.Count > 0) - { - sb.AppendLine("\tExchangeBuff:"); + foreach (var buff in Request.ReceiveBuff) + { + sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16} Flags: {buff.Flags}"); + } + } - foreach (var buff in Request.ExchangeBuff) + if (Request.ExchangeBuff.Count > 0) { - sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16} Flags: {buff.Flags}"); - } - } + sb.AppendLine("\tExchangeBuff:"); - if (Request.RecvListBuff.Count > 0) - { - sb.AppendLine("\tRecvListBuff:"); + foreach (var buff in Request.ExchangeBuff) + { + sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16} Flags: {buff.Flags}"); + } + } - foreach (var buff in Request.RecvListBuff) + if (Request.RecvListBuff.Count > 0) { - sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16}"); + sb.AppendLine("\tRecvListBuff:"); + + foreach (var buff in Request.RecvListBuff) + { + sb.AppendLine($"\tPosition: 0x{buff.Position:x16} Size: 0x{buff.Size:x16}"); + } } - } - sb.AppendLine(); + sb.AppendLine(); + } sb.AppendLine("Raw Request Data:"); sb.Append(HexUtils.HexTable(Request.RawData)); |