dmnt2: first pass at wait-for-application

This commit is contained in:
Michael Scire 2021-10-31 23:57:28 -07:00 committed by SciresM
parent 1d908295fe
commit ca0308c7ca
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());