mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-14 15:14:23 -04:00
kern: add handle table/process/suspend/resume debug
This commit is contained in:
parent
af259eabda
commit
8a4bf6a0a8
10 changed files with 233 additions and 18 deletions
|
@ -41,6 +41,38 @@ namespace ams::kern::svc {
|
|||
KDumpObject::DumpThreadCallStack(arg0);
|
||||
}
|
||||
break;
|
||||
case ams::svc::KernelDebugType_Handle:
|
||||
if (arg0 == static_cast<u64>(-1)) {
|
||||
KDumpObject::DumpHandle();
|
||||
} else {
|
||||
KDumpObject::DumpHandle(arg0);
|
||||
}
|
||||
break;
|
||||
case ams::svc::KernelDebugType_Process:
|
||||
if (arg0 == static_cast<u64>(-1)) {
|
||||
KDumpObject::DumpProcess();
|
||||
} else {
|
||||
KDumpObject::DumpProcess(arg0);
|
||||
}
|
||||
break;
|
||||
case ams::svc::KernelDebugType_SuspendProcess:
|
||||
if (KProcess *process = KProcess::GetProcessFromId(arg0); process != nullptr) {
|
||||
ON_SCOPE_EXIT { process->Close(); };
|
||||
|
||||
if (R_SUCCEEDED(process->SetActivity(ams::svc::ProcessActivity_Paused))) {
|
||||
MESOSPHERE_RELEASE_LOG("Suspend Process ID=%3lu\n", process->GetId());
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ams::svc::KernelDebugType_ResumeProcess:
|
||||
if (KProcess *process = KProcess::GetProcessFromId(arg0); process != nullptr) {
|
||||
ON_SCOPE_EXIT { process->Close(); };
|
||||
|
||||
if (R_SUCCEEDED(process->SetActivity(ams::svc::ProcessActivity_Runnable))) {
|
||||
MESOSPHERE_RELEASE_LOG("Resume Process ID=%3lu\n", process->GetId());
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue