pgl/pm: add GetProcessId command

This commit is contained in:
Michael Scire
2025-11-13 12:34:28 -07:00
committed by SciresM
parent 0fb9481e59
commit 4b32a2b964
8 changed files with 31 additions and 2 deletions

View File

@@ -67,6 +67,10 @@ namespace ams::pgl::srv {
R_SUCCEED();
}
Result ShellInterfaceCommon::GetProcessId(os::ProcessId *out, ncm::ProgramId program_id) {
R_RETURN(pm::shell::GetProcessId(out, program_id));
}
Result ShellInterfaceCommon::TriggerApplicationSnapShotDumperImpl(SnapShotDumpType dump_type, const void *arg, size_t arg_size) {
AMS_UNUSED(arg_size);
R_RETURN(pgl::srv::TriggerApplicationSnapShotDumper(dump_type, static_cast<const char *>(arg)));
@@ -116,6 +120,10 @@ namespace ams::pgl::srv {
R_RETURN(this->TriggerApplicationSnapShotDumperImpl(dump_type, arg.GetPointer(), arg.GetSize()));
}
Result ShellInterfaceCmif::GetProcessId(ams::sf::Out<os::ProcessId> out, ncm::ProgramId program_id) {
R_RETURN(ShellInterfaceCommon::GetProcessId(out.GetPointer(), program_id));
}
Result ShellInterfaceCmif::GetShellEventObserver(ams::sf::Out<ams::sf::SharedPointer<pgl::sf::IEventObserver>> out) {
/* Allocate a new interface. */
auto session = ObjectFactory::CreateSharedEmplaced<pgl::sf::IEventObserver, ShellEventObserverCmif>(m_allocator);
@@ -170,6 +178,10 @@ namespace ams::pgl::srv {
R_RETURN(this->EnableApplicationAllThreadDumpOnCrashImpl(enabled));
}
Result ShellInterfaceTipc::GetProcessId(ams::tipc::Out<os::ProcessId> out, ncm::ProgramId program_id) {
R_RETURN(ShellInterfaceCommon::GetProcessId(out.GetPointer(), program_id));
}
Result ShellInterfaceTipc::GetShellEventObserver(ams::tipc::OutMoveHandle out) {
R_RETURN(pgl::srv::AllocateShellEventObserverForTipc(out.GetPointer()));
}