What's context switched, and what's just used while handling an event is seriously spread all over currently. This patch is a stepping in cleaning that up a bit, by splitting execution_control_state in three: /* Context-switchable data. */ struct thread_stepping_state { /* Should we step over breakpoint next time keep_going is called? */ int stepping_over_breakpoint; struct symtab_and_line sal; int current_line; struct symtab *current_symtab; int step_after_step_resume_breakpoint; int stepping_through_solib_after_catch; bpstat stepping_through_solib_catchpoints; }; /* Data to be passed around while handling an event. This data is discarded between events. */ struct execution_control_state { ptid_t ptid; struct target_waitstatus ws; int random_signal; CORE_ADDR stop_func_start; CORE_ADDR stop_func_end; char *stop_func_name; int new_thread_event; int wait_some_more; }; /* global inferior control state P/ /* The PTID we'll do a target_wait on.*/ ptid_t waiton_ptid; /* Current inferior wait state. */ enum infwait_states infwait_state; -- Pedro Alves