This is the mail archive of the
mailing list for the GDB project.
Re: [non-stop] 05/10 Refactor a bit infrun.c
- From: Daniel Jacobowitz <drow at false dot org>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 25 Jun 2008 15:11:59 -0400
- Subject: Re: [non-stop] 05/10 Refactor a bit infrun.c
- References: <email@example.com>
On Sun, Jun 15, 2008 at 10:04:43PM +0100, Pedro Alves wrote:
> 2008-06-15 Pedro Alves <firstname.lastname@example.org>
> * infrun.c (currently_stepping): Take a struct
> thread_stepping_state instead of an execution_control_state.
> (struct thread_stepping_state): New, split from
> (gtss, tss): New globals.
> (proceed): Clear the stepping state, set previous_inferior_ptid
> and clear infwait state.
> (init_wait_for_inferior): Clear the stepping state,
> previous_inferior_ptid and infwait state.
> (waiton_ptid, infwait_state): New, split from
> (struct execution_control_state): Members that persist through
> events moved out to either struct thred_stepping_state or made
> global. Deleted unneeded wp, saved_inferior_ptid, tmpstatus.
> (wait_for_inferior, fetch_inferior_event): Use local
> execution_control_state. Update to execution_control_state split.
> (init_execution_control_state): Adjust.
> (init_thread_stepping_state): New, extracted from
> (context_switch): Take a ptid instead of an
> (context_switch_to): Adjust.
> (adjust_pc_after_break): Adjust.
> (init_infwait_state): New.
> (handle_inferior_event): Adjust.
> @@ -1491,13 +1510,16 @@ wait_for_inferior (int treat_exec_as_sig
> fetch_inferior_event (void *client_data)
> + struct execution_control_state ecss = ecss;
Please don't use this - IIRC it's a GCC extension to shut up
uninitialized variable warnings. If there are warnings without the
initializer, just memset it.