From bc7658d3d30f4d5dbc08f12af774c4813c96bdea Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Tue, 19 Aug 2025 11:08:29 +0200 Subject: [PATCH] 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. --- Libraries/LibCore/Process.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Libraries/LibCore/Process.cpp b/Libraries/LibCore/Process.cpp index cb9f95d080b..2e9c5e0081d 100644 --- a/Libraries/LibCore/Process.cpp +++ b/Libraries/LibCore/Process.cpp @@ -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;