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: RFA: fix PR breakpoints/13776


On Tue, Feb 28, 2012 at 9:26 AM, Tom Tromey <tromey@redhat.com> wrote:
> I'd appreciate comments on this patch.
> [...]
> This patch fixes this problem by moving the breakpoint_init_inferior
> call earlier in generic_mourn_inferior. ?This causes the breakpoints to
> be marked as uninserted before they are deleted.
> [...]
> diff --git a/gdb/target.c b/gdb/target.c
> index 1f408f6..65a6c23 100644
> --- a/gdb/target.c
> +++ b/gdb/target.c
> @@ -3583,13 +3583,14 @@ generic_mourn_inferior (void)
> ? ptid = inferior_ptid;
> ? inferior_ptid = null_ptid;
>
> + ?breakpoint_init_inferior (inf_exited);
> +
> ? if (!ptid_equal (ptid, null_ptid))
> ? ? {
> ? ? ? int pid = ptid_get_pid (ptid);
> ? ? ? exit_inferior (pid);
> ? ? }
>
> - ?breakpoint_init_inferior (inf_exited);
> ? registers_changed ();
>
> ? reopen_exec_file ();

A comment right before the new breakpoint_init_inferior call to
explain why it lives there would be useful to future readers of the
code.


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