mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-23 04:41:12 +00:00
pgl: add new snapshotdump logic
This commit is contained in:
parent
4be5733c8e
commit
6a81206373
1 changed files with 9 additions and 1 deletions
|
@ -311,6 +311,13 @@ namespace ams::pgl::srv {
|
||||||
continue_getting_event = false;
|
continue_getting_event = false;
|
||||||
break;
|
break;
|
||||||
case pm::ProcessEvent::Exited:
|
case pm::ProcessEvent::Exited:
|
||||||
|
{
|
||||||
|
/* If SnapShotDumper terminated, trigger a crash report. */
|
||||||
|
if (event_info.process_id == g_ssd_process_id && g_crashed_process_id != os::InvalidProcessId) {
|
||||||
|
TriggerCrashReport(g_crashed_process_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[[fallthrough]];
|
||||||
case pm::ProcessEvent::Started:
|
case pm::ProcessEvent::Started:
|
||||||
case pm::ProcessEvent::Exception:
|
case pm::ProcessEvent::Exception:
|
||||||
case pm::ProcessEvent::DebugRunning:
|
case pm::ProcessEvent::DebugRunning:
|
||||||
|
@ -484,7 +491,8 @@ namespace ams::pgl::srv {
|
||||||
os::ProcessId process_id;
|
os::ProcessId process_id;
|
||||||
R_TRY(pm::shell::GetApplicationProcessIdForShell(std::addressof(process_id)));
|
R_TRY(pm::shell::GetApplicationProcessIdForShell(std::addressof(process_id)));
|
||||||
|
|
||||||
/* Launch the snapshot dumper. */
|
/* Launch the snapshot dumper, clearing the global tracker process id. */
|
||||||
|
ON_SCOPE_EXIT { g_ssd_process_id = os::InvalidProcessId; };
|
||||||
return TriggerSnapShotDumper(process_id, dump_type, arg);
|
return TriggerSnapShotDumper(process_id, dump_type, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue