This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/8] Fix follow-fork latent bug


Pedro Alves <palves@redhat.com> writes:

> -	  old_chain = save_inferior_ptid ();
> -	  save_current_program_space ();
> +	  old_chain = save_current_space_and_thread ();
>  
>  	  inferior_ptid = child_ptid;
>  	  add_thread (inferior_ptid);
> +	  set_current_inferior (child_inf);
>  	  child_inf->symfile_flags = SYMFILE_NO_READ;

Can we set up child thread_info inferior and pspace first, and then,
call switch_to_thread_no_regs to switch them in one go?

>  
>  	  /* If this is a vfork child, then the address-space is
> @@ -631,6 +631,7 @@ holding the child stopped.  Try \"set detach-on-fork\" or \
>  
>        inferior_ptid = child_ptid;
>        add_thread (inferior_ptid);
> +      set_current_inferior (child_inf);

-- 
Yao (齐尧)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]