LibCore: Don't send SIGTRAP when debugger attaches

Both gdb and lldb interrupt execution after attaching to the process, so
no need to send a SIGTRAP immediately after which would require typing
`continue` in the debugger twice.
This commit is contained in:
Jelle Raaijmakers 2025-08-19 11:08:29 +02:00 committed by Tim Flynn
commit bc7658d3d3
Notes: github-actions[bot] 2025-08-19 10:25:58 +00:00

View file

@ -307,10 +307,8 @@ void Process::wait_for_debugger_and_break()
dbgln("Cannot wait for debugger: {}. Continuing.", check.release_error());
return;
}
if (check.value()) {
kill(getpid(), SIGTRAP);
if (check.value())
return;
}
if (should_print_process_info) {
dbgln("Process {} with pid {} is sleeping, waiting for debugger.", Process::get_name(), getpid());
should_print_process_info = false;