mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-12 22:36:59 +00:00
Create minidump at ProcessUnhandledException
This commit is contained in:
parent
3a593b6084
commit
4bd46c50be
2 changed files with 35 additions and 0 deletions
|
|
@ -510,6 +510,11 @@ namespace Ryujinx.HLE.HOS
|
|||
}
|
||||
}
|
||||
|
||||
public string DebugGetApplicationProcessMinidump()
|
||||
{
|
||||
return DebugGetApplicationProcess()?.Debugger?.GetMinidump();
|
||||
}
|
||||
|
||||
internal KProcess DebugGetApplicationProcess()
|
||||
{
|
||||
lock (KernelContext.Processes)
|
||||
|
|
|
|||
|
|
@ -382,6 +382,11 @@ namespace Ryujinx.Ava
|
|||
exceptions.Add(initialException);
|
||||
}
|
||||
|
||||
if (isTerminating)
|
||||
{
|
||||
TryWriteApplicationMinidump();
|
||||
}
|
||||
|
||||
foreach (Exception e in exceptions)
|
||||
{
|
||||
string message = $"Unhandled exception caught: {e}";
|
||||
|
|
@ -400,6 +405,31 @@ namespace Ryujinx.Ava
|
|||
}
|
||||
}
|
||||
|
||||
private static void TryWriteApplicationMinidump()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (HLE.Switch.Shared is not { } device)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var minidump = device?.System?.DebugGetApplicationProcessMinidump();
|
||||
|
||||
if (minidump == null)
|
||||
{
|
||||
Logger.Warning?.Print(LogClass.Application, "Failed to create minidump");
|
||||
return;
|
||||
}
|
||||
|
||||
Logger.Info?.Print(LogClass.Application, minidump);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Error?.Print(LogClass.Application, $"Failed to create minidump: {e.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Exit()
|
||||
{
|
||||
DiscordIntegrationModule.Exit();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue