This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: fix PR breakpoints/13776
- From: Doug Evans <dje at google dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 28 Feb 2012 12:35:47 -0800
- Subject: Re: RFA: fix PR breakpoints/13776
- Authentication-results: mr.google.com; spf=pass (google.com: domain of dje@google.com designates 10.52.71.166 as permitted sender) smtp.mail=dje@google.com; dkim=pass header.i=dje@google.com
- References: <878vjmswbr.fsf@fleche.redhat.com>
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.