feat: add process crash popups
This commit is contained in:
@@ -902,4 +902,11 @@ namespace Sched {
|
||||
return &processTable[slot];
|
||||
}
|
||||
|
||||
int SpawnCrashPad() {
|
||||
// Spawn crashpad as a child of init (slot 0), not the crashing process.
|
||||
// We can't use the current process context since we're in ExitProcess.
|
||||
static constexpr const char* crashpadPath = "0:/apps/crashpad/crashpad.elf";
|
||||
return Spawn(crashpadPath, nullptr);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -122,6 +122,10 @@ namespace Sched {
|
||||
// Find a process by PID (returns nullptr if not found or not alive)
|
||||
Process* GetProcessByPid(int pid);
|
||||
|
||||
// Spawn a crashpad process with the given crash file path as argument.
|
||||
// Called by the exception handler when a process faults.
|
||||
int SpawnCrashPad();
|
||||
|
||||
// Get a pointer to slot i in the process table (for enumeration)
|
||||
Process* GetProcessSlot(int slot);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user