{
const int attach_flag = current_inferior ()->attach_flag;
- /* Only handle Ctrl-C event. Ignore others. */
- if (event_type != CTRL_C_EVENT)
+ /* Only handle Ctrl-C and Ctrl-Break events. Ignore others. */
+ if (event_type != CTRL_C_EVENT && event_type != CTRL_BREAK_EVENT)
return FALSE;
/* If the inferior and the debugger share the same console, do nothing as
clear_proceed_status ();
init_wait_for_inferior ();
- inf = add_inferior (pid);
+ inf = current_inferior ();
+ inferior_appeared (inf, pid);
inf->attach_flag = attaching;
/* Make the new process the current inferior, so terminal handling