mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-08-06 16:18:51 +00:00
kern: add page table contents debug
This commit is contained in:
parent
1ec2c0c2cb
commit
9a6cca7499
6 changed files with 189 additions and 16 deletions
|
@ -60,6 +60,31 @@ namespace ams::kern::svc {
|
|||
KDumpObject::DumpMemory(arg0);
|
||||
}
|
||||
break;
|
||||
case ams::svc::KernelDebugType_PageTable:
|
||||
if (arg0 == static_cast<u64>(-2)) {
|
||||
KDumpObject::DumpKernelPageTable();
|
||||
} else if (arg0 == static_cast<u64>(-1)) {
|
||||
KDumpObject::DumpPageTable();
|
||||
} else {
|
||||
KDumpObject::DumpPageTable(arg0);
|
||||
}
|
||||
break;
|
||||
case ams::svc::KernelDebugType_CpuUtilization:
|
||||
{
|
||||
const auto old_prio = GetCurrentThread().GetBasePriority();
|
||||
GetCurrentThread().SetBasePriority(3);
|
||||
|
||||
if (arg0 == static_cast<u64>(-2)) {
|
||||
KDumpObject::DumpKernelCpuUtilization();
|
||||
} else if (arg0 == static_cast<u64>(-1)) {
|
||||
KDumpObject::DumpCpuUtilization();
|
||||
} else {
|
||||
KDumpObject::DumpCpuUtilization(arg0);
|
||||
}
|
||||
|
||||
GetCurrentThread().SetBasePriority(old_prio);
|
||||
}
|
||||
break;
|
||||
case ams::svc::KernelDebugType_Process:
|
||||
if (arg0 == static_cast<u64>(-1)) {
|
||||
KDumpObject::DumpProcess();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue