LibDebug: Don't continue the debuggee before detaching

Since 0b7dc6869e, all ptrace operations except PT_TRACE_ME and
PT_ATTACH are forbidden unless the tracee is stopped. This includes
PT_DETACH.
This commit is contained in:
Sönke Holz authored and Sönke Holz committed 2026-06-22 01:35:57 +02:00
1 parent 38c474314f
commit db7686eaf1
1 file changed
+2 -1
+2 -1
View File
@@ -398,7 +398,8 @@ void DebugSession::detach()
} }
for (auto& watchpoint : m_watchpoints.keys()) for (auto& watchpoint : m_watchpoints.keys())
remove_watchpoint(watchpoint); remove_watchpoint(watchpoint);
continue_debuggee();
// The destructor will call ptrace(PT_DETACH).
} }
Optional<DebugSession::InsertBreakpointAtSymbolResult> DebugSession::insert_breakpoint(ByteString const& symbol_name) Optional<DebugSession::InsertBreakpointAtSymbolResult> DebugSession::insert_breakpoint(ByteString const& symbol_name)