pm: Support for 6.0.0

This commit is contained in:
Michael Scire 2018-09-08 23:47:15 -07:00
parent 28e4d4411d
commit 488fc0f119
10 changed files with 143 additions and 88 deletions

View file

@ -41,6 +41,11 @@ Result DebugMonitorService::dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64
case Dmnt_Cmd_5X_EnableDebugForApplication:
rc = WrapIpcCommandImpl<&DebugMonitorService::enable_debug_for_application>(this, r, out_c, pointer_buffer, pointer_buffer_size);
break;
case Dmnt_Cmd_6X_DisableDebug:
if (kernelAbove600()) {
rc = WrapIpcCommandImpl<&DebugMonitorService::disable_debug>(this, r, out_c, pointer_buffer, pointer_buffer_size);
}
break;
case Dmnt_Cmd_5X_AtmosphereGetProcessHandle:
rc = WrapIpcCommandImpl<&DebugMonitorService::get_process_handle>(this, r, out_c, pointer_buffer, pointer_buffer_size);
break;
@ -141,6 +146,11 @@ std::tuple<Result, CopiedHandle> DebugMonitorService::enable_debug_for_applicati
return {rc, h};
}
std::tuple<Result> DebugMonitorService::disable_debug(u32 which) {
return {Registration::DisableDebug(which)};
}
std::tuple<Result, CopiedHandle> DebugMonitorService::get_process_handle(u64 pid) {
std::shared_ptr<Registration::Process> proc = Registration::GetProcess(pid);
if(proc == NULL) {