[RFA 2/3] Change detach_breakpoints to take a ptid instead of a pid
Pedro Alves
palves@redhat.com
Thu Jun 21 15:02:00 GMT 2012
On 06/14/2012 07:29 PM, Joel Brobecker wrote:
> One of the consequences of this patch is that it trips an assert
> on GNU/Linux targets. But this assert appears to have not actual
> purpose, and is thus removed.
It's purpose was just to ensure that that particular path would
only be reached through fork->detach_breakpoints.
But since it gets in the way, indeed let's just remove it.
> gdb/ChangeLog:
>
> * breakpoint.h (detach_breakpoints): pid parameter is now a ptid.
> * breakpoint.c (detach_breakpoints): Change pid parameter into
> a ptid. Adjust code accordingly.
> * infrun.c (handle_inferior_event): Delete variable child_pid.
> Update call to detach_breakpoints to pass the child ptid for
> fork events.
> * linux-nat.c (linux_nat_iterate_watchpoint_lwps): Remove
> assert that inferior_ptid's lwp is zero.
> (linux_handle_extended_wait): Update call to detach_breakpoints.
>
> OK to apply?
Looks fine to me. One nit:
> @@ -2296,7 +2295,7 @@ linux_handle_extended_wait (struct lwp_info *lp, int status,
>
> /* This won't actually modify the breakpoint list, but will
> physically remove the breakpoints from the child. */
> - detach_breakpoints (new_pid);
> + detach_breakpoints (ptid_build (new_pid, 0, 0));
Can you make this "ptid_build (new_pid, new_pid, 0)" so that all places
consistently have a valid lwpid?
--
Pedro Alves
More information about the Gdb-patches
mailing list