dmnt2: first pass at wait-for-application

This commit is contained in:
Michael Scire
2021-10-31 23:57:28 -07:00
parent 56669e34b7
commit 9011384dbe
6 changed files with 39 additions and 9 deletions

View File

@@ -27,10 +27,15 @@ namespace ams::dmnt {
}
Result DebugProcess::Attach(os::ProcessId process_id) {
Result DebugProcess::Attach(os::ProcessId process_id, bool start_process) {
/* Attach to the process. */
R_TRY(svc::DebugActiveProcess(std::addressof(m_debug_handle), process_id.value));
/* If necessary, start the process. */
if (start_process) {
R_ABORT_UNLESS(pm::dmnt::StartProcess(process_id));
}
/* Collect initial information. */
R_TRY(this->Start());