فهرست منبع

Print guest stack trace on a few points that can throw exceptions

gdkchan 8 سال پیش
والد
کامیت
db0aa54233

+ 0 - 1
ChocolArm64/Instruction/AInstEmitException.cs

@@ -1,7 +1,6 @@
 using ChocolArm64.Decoder;
 using ChocolArm64.State;
 using ChocolArm64.Translation;
-using System.Reflection;
 using System.Reflection.Emit;
 
 namespace ChocolArm64.Instruction

+ 2 - 0
Ryujinx.Core/OsHle/Kernel/SvcHandler.cs

@@ -93,6 +93,8 @@ namespace Ryujinx.Core.OsHle.Kernel
             }
             else
             {
+                Process.PrintStackTrace(ThreadState);
+
                 throw new NotImplementedException(e.Id.ToString("x4"));
             }
         }

+ 6 - 1
Ryujinx.Core/OsHle/Kernel/SvcSystem.cs

@@ -211,6 +211,8 @@ namespace Ryujinx.Core.OsHle.Kernel
             long Unknown = (long)ThreadState.X1;
             long Info    = (long)ThreadState.X2;
 
+            Process.PrintStackTrace(ThreadState);
+
             throw new GuestBrokeExecutionException();
         }
 
@@ -297,7 +299,10 @@ namespace Ryujinx.Core.OsHle.Kernel
                     ThreadState.X1 = MemoryRegions.MapRegionSize;
                     break;
 
-                default: throw new NotImplementedException($"SvcGetInfo: {InfoType} {Handle} {InfoId}");
+                default:
+                    Process.PrintStackTrace(ThreadState);
+
+                    throw new NotImplementedException($"SvcGetInfo: {InfoType} {Handle:x8} {InfoId}");
             }
 
             ThreadState.X0 = 0;

+ 1 - 1
Ryujinx.Core/OsHle/Process.cs

@@ -303,7 +303,7 @@ namespace Ryujinx.Core.OsHle
                 Trace.AppendLine(" " + SubName + " (" + GetNsoNameAndAddress(Position) + ")");
             }
 
-            Logging.Trace(LogClass.CPU, Trace.ToString());
+            Logging.Info(LogClass.CPU, Trace.ToString());
         }
 
         private string GetNsoNameAndAddress(long Position)