aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Core/OsHle/Process.cs
diff options
context:
space:
mode:
authorThomas Guillemard <thog@protonmail.com>2018-05-22 22:40:02 +0200
committergdkchan <gab.dark.100@gmail.com>2018-05-22 17:40:02 -0300
commitfa4b34bd19e201662ead605568dd47fb8f95d02a (patch)
tree4205bacd4d05eae213bbec4491dcba270cd2ad76 /Ryujinx.Core/OsHle/Process.cs
parent7ac5f40532e4bd96641867035dfda86d2a9d7260 (diff)
Add a C++ demangler (#119)
* Add a C++ demangler for PrintStackTrace This is a simple C++ demangler (only supporting name demangling) that will probably be enough for any stacktrace cases. * Create Ryujinx.Core.OsHle.Diagnostics.Demangler and move DemangleName * Rename Demangler -> Demangle + Fix coding style * Starting a real parsing for demangler (still simple and no compression support yet) * Partially implement decompression * Improve compression support (still need to fix errored compression indexing) * Some cleanup * Fix Demangle.Parse call in PrintStackTrace * Trim parameters result to get more clear prototypes * Rename Demangle -> Demangler and fix access level * Fix substitution possible issues also improve code readability * Redo compression indexing to be more accurate * Add support of not nested function name
Diffstat (limited to 'Ryujinx.Core/OsHle/Process.cs')
-rw-r--r--Ryujinx.Core/OsHle/Process.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Ryujinx.Core/OsHle/Process.cs b/Ryujinx.Core/OsHle/Process.cs
index 44289c41..ea8ae139 100644
--- a/Ryujinx.Core/OsHle/Process.cs
+++ b/Ryujinx.Core/OsHle/Process.cs
@@ -5,6 +5,7 @@ using ChocolArm64.State;
using Ryujinx.Core.Loaders;
using Ryujinx.Core.Loaders.Executables;
using Ryujinx.Core.Logging;
+using Ryujinx.Core.OsHle.Diagnostics;
using Ryujinx.Core.OsHle.Exceptions;
using Ryujinx.Core.OsHle.Handles;
using Ryujinx.Core.OsHle.Kernel;
@@ -306,6 +307,10 @@ namespace Ryujinx.Core.OsHle
{
SubName = $"Sub{Position:x16}";
}
+ else if (SubName.StartsWith("_Z"))
+ {
+ SubName = Demangler.Parse(SubName);
+ }
Trace.AppendLine(" " + SubName + " (" + GetNsoNameAndAddress(Position) + ")");
}