From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8657 invoked by alias); 20 Apr 2011 13:57:41 -0000 Received: (qmail 8648 invoked by uid 22791); 20 Apr 2011 13:57:40 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-vx0-f169.google.com (HELO mail-vx0-f169.google.com) (209.85.220.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Apr 2011 13:57:26 +0000 Received: by vxk20 with SMTP id 20so717034vxk.0 for ; Wed, 20 Apr 2011 06:57:25 -0700 (PDT) Received: by 10.220.187.4 with SMTP id cu4mr2224515vcb.58.1303307845089; Wed, 20 Apr 2011 06:57:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.61.6 with HTTP; Wed, 20 Apr 2011 06:57:05 -0700 (PDT) In-Reply-To: References: From: Kevin Pouget Date: Wed, 20 Apr 2011 13:57:00 -0000 Message-ID: Subject: Re: [PATCH] Remove same-pc breakpoint notification for internal BPs To: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2011-04/txt/msg00356.txt.bz2 ... and the missing ChangeLog: 2011-04-20 Kevin Pouget * breakpoint.c (describe_other_breakpoints): Do not write 'duplicate' note if the breakpoint is internal. On Wed, Apr 20, 2011 at 9:43 AM, Kevin Pouget wrot= e: > Hello, > > I'd like to suggest a patch which removes the message > >> (gdb) break function >> Note: breakpoint -1 also set at pc 0x3cbd80e2a0. >> Breakpoint 1 at 0x3cbd80e2a0 > > when the user sets a breakpoint at the same PC as a _internal_ breakpoint= s. > Internal bps are meant to be hidden from the user, so this patch goes thi= s way > > (it might happen more often now that it's easy to create internal BPs > from the Python interface, and that's what I'm doing) > > Cordially, > > Kevin > > (How can I run the testsuite only for gdb.base, for instance? nothing > should fail here, because the testsuite only matches "Note: breakpoint > \[0-9\]+ also set...", but I would have preferred actually testing > it!) > > -- > > diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c > index 2352191..2208a80 100644 > --- a/gdb/breakpoint.c > +++ b/gdb/breakpoint.c > @@ -5397,7 +5397,7 @@ breakpoint_has_pc (struct breakpoint *b, > =A0 return 0; > =A0} > > -/* Print a message describing any breakpoints set at PC. =A0This > +/* Print a message describing any user-breakpoints set at PC. =A0This > =A0 =A0concerns with logical breakpoints, so we match program spaces, not > =A0 =A0address spaces. =A0*/ > > @@ -5410,7 +5410,8 @@ describe_other_breakpoints (struct gdbarch *gdbarch, > =A0 struct breakpoint *b; > > =A0 ALL_BREAKPOINTS (b) > - =A0 =A0others +=3D breakpoint_has_pc (b, pspace, pc, section); > + =A0 =A0others +=3D breakpoint_has_pc (b, pspace, pc, section) > + =A0 =A0 =A0&& b->number >=3D 0; > =A0 if (others > 0) > =A0 =A0 { > =A0 =A0 =A0 if (others =3D=3D 1) > @@ -5418,7 +5419,7 @@ describe_other_breakpoints (struct gdbarch *gdbarch, > =A0 =A0 =A0 else /* if (others =3D=3D ???) */ > =A0 =A0 =A0 =A0printf_filtered (_("Note: breakpoints ")); > =A0 =A0 =A0 ALL_BREAKPOINTS (b) > - =A0 =A0 =A0 if (breakpoint_has_pc (b, pspace, pc, section)) > + =A0 =A0 =A0 if (breakpoint_has_pc (b, pspace, pc, section) && b->number= >=3D 0) > =A0 =A0 =A0 =A0 =A0{ > =A0 =A0 =A0 =A0 =A0 =A0others--; > =A0 =A0 =A0 =A0 =A0 =A0printf_filtered ("%d", b->number); >