--- gdb-5.2.1/gdb/remote.c.orig Tue Nov 4 13:16:11 2003 +++ gdb-5.2.1/gdb/remote.c Tue Nov 4 13:48:52 2003 @@ -2482,7 +2482,7 @@ remote_exec_shellcmd(char *arg, int from struct remote_state *rs = get_remote_state (); char *buf = alloca (rs->remote_packet_size); - sprintf(buf, "E%*s", (int)(rs->remote_packet_size - 2), arg); + sprintf(buf, "V%*s", (int)(rs->remote_packet_size - 2), arg); putpkt(buf); ofunc = (void (*)()) signal (SIGINT, remote_interrupt); @@ -2664,7 +2664,7 @@ remote_resume (ptid_t ptid, int step, en int pid = PIDGET (ptid); char *p; - if (pid == -1) + if (pid == -1 || !step) set_thread (0, 0); /* run any thread */ else set_thread (pid, 0); /* run this thread */ --- gdb-5.2.1/gdb/infrun.c.orig Sun Feb 24 23:31:19 2002 +++ gdb-5.2.1/gdb/infrun.c Tue Nov 4 13:45:43 2003 @@ -1937,8 +1937,12 @@ handle_inferior_event (struct execution_ if (stop_signal != TARGET_SIGNAL_TRAP && !signal_stop[stop_signal]) { - if (printed) - target_terminal_inferior (); + if (signal_print[stop_signal]) + { + target_terminal_ours_for_output (); + print_stop_reason (SIGNAL_RECEIVED, stop_signal); + target_terminal_inferior(); + } /* Clear the signal if it should not be passed. */ if (signal_program[stop_signal] == 0)