From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24888 invoked by alias); 28 Feb 2012 20:36:02 -0000 Received: (qmail 24748 invoked by uid 22791); 28 Feb 2012 20:36:01 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-vw0-f41.google.com (HELO mail-vw0-f41.google.com) (209.85.212.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Feb 2012 20:35:48 +0000 Received: by vbbey12 with SMTP id ey12so2260257vbb.0 for ; Tue, 28 Feb 2012 12:35:47 -0800 (PST) Received-SPF: pass (google.com: domain of dje@google.com designates 10.52.71.166 as permitted sender) client-ip=10.52.71.166; 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 Received: from mr.google.com ([10.52.71.166]) by 10.52.71.166 with SMTP id w6mr15030308vdu.20.1330461347875 (num_hops = 1); Tue, 28 Feb 2012 12:35:47 -0800 (PST) Received: by 10.52.71.166 with SMTP id w6mr12472607vdu.20.1330461347831; Tue, 28 Feb 2012 12:35:47 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.71.166 with SMTP id w6mr12472586vdu.20.1330461347585; Tue, 28 Feb 2012 12:35:47 -0800 (PST) Received: by 10.220.21.4 with HTTP; Tue, 28 Feb 2012 12:35:47 -0800 (PST) In-Reply-To: <878vjmswbr.fsf@fleche.redhat.com> References: <878vjmswbr.fsf@fleche.redhat.com> Date: Tue, 28 Feb 2012 21:05:00 -0000 Message-ID: Subject: Re: RFA: fix PR breakpoints/13776 From: Doug Evans To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true X-Gm-Message-State: ALoCoQlUEeqxuHzomga3wDPQlv53g4NGOax0oM0kVle8w8qTC8AAZSxRQUEWUs8SVEiS6344Sc/dSqZsg8pyMVBH9FQEKJnvVtrL/+TU2hqWi98IJT5skeD0IZabkUqSoWTvB6U90AKM9wUa4c+TSQVTeGRSZisMig== X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-02/txt/msg00673.txt.bz2 On Tue, Feb 28, 2012 at 9:26 AM, Tom Tromey 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. =A0This 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) > =A0 ptid =3D inferior_ptid; > =A0 inferior_ptid =3D null_ptid; > > + =A0breakpoint_init_inferior (inf_exited); > + > =A0 if (!ptid_equal (ptid, null_ptid)) > =A0 =A0 { > =A0 =A0 =A0 int pid =3D ptid_get_pid (ptid); > =A0 =A0 =A0 exit_inferior (pid); > =A0 =A0 } > > - =A0breakpoint_init_inferior (inf_exited); > =A0 registers_changed (); > > =A0 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.