Hi, kill_kludge in remote.c is no longer needed. handle_inferior_event is no longer calling target_kill on a TARGET_WAITKIND_SIGNALLED. case TARGET_WAITKIND_SIGNALLED: if (debug_infrun) fprintf_unfiltered (gdb_stdlog, "infrun: TARGET_WAITKIND_SIGNALLED\n"); stop_print_frame = 0; stop_signal = ecs->ws.value.sig; target_terminal_ours (); /* Must do this before mourn anyway */ /* Note: By definition of TARGET_WAITKIND_SIGNALLED, we shouldn't reach here unless the inferior is dead. However, for years target_kill() was called here, which hints that fatal signals aren't really fatal on some systems. If that's true, then some changes may be needed. */ target_mourn_inferior (); print_stop_reason (SIGNAL_EXITED, stop_signal); singlestep_breakpoints_inserted_p = 0; stop_stepping (ecs); return; Because of that, the kill_kludge introduces a bug in this sequence: target remote :9999 signal 9 (inferior exits signaled, kill_kludge is step, but target_kill isn't called) (restart stub) target remote :9999 (kill_kludge isn't cleared) kill (kill_kludge is set, so 'k' is not sent to the stub... static void remote_kill (void) { /* For some mysterious reason, wait_for_inferior calls kill instead of mourn after it gets TARGET_WAITKIND_SIGNALLED. Work around it. */ if (kill_kludge) { kill_kludge = 0; target_mourn_inferior (); return; } /* Use catch_errors so the user can quit from gdb even when we aren't on speaking terms with the remote system. */ catch_errors ((catch_errors_ftype *) putpkt, "k", "", RETURN_MASK_ERROR); /* Don't wait for it to die. I'm not really sure it matters whether we do or not. For the existing stubs, kill is a noop. */ target_mourn_inferior (); } -- Pedro Alves