Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Remove same-pc breakpoint notification for internal BPs
@ 2011-04-20 13:44 Kevin Pouget
  2011-04-20 13:57 ` Kevin Pouget
  2011-04-20 19:03 ` Tom Tromey
  0 siblings, 2 replies; 15+ messages in thread
From: Kevin Pouget @ 2011-04-20 13:44 UTC (permalink / raw)
  To: gdb-patches

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_ breakpoints.
Internal bps are meant to be hidden from the user, so this patch goes this 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,
   return 0;
 }

-/* Print a message describing any breakpoints set at PC.  This
+/* Print a message describing any user-breakpoints set at PC.  This
    concerns with logical breakpoints, so we match program spaces, not
    address spaces.  */

@@ -5410,7 +5410,8 @@ describe_other_breakpoints (struct gdbarch *gdbarch,
   struct breakpoint *b;

   ALL_BREAKPOINTS (b)
-    others += breakpoint_has_pc (b, pspace, pc, section);
+    others += breakpoint_has_pc (b, pspace, pc, section)
+      && b->number >= 0;
   if (others > 0)
     {
       if (others == 1)
@@ -5418,7 +5419,7 @@ describe_other_breakpoints (struct gdbarch *gdbarch,
       else /* if (others == ???) */
 	printf_filtered (_("Note: breakpoints "));
       ALL_BREAKPOINTS (b)
-	if (breakpoint_has_pc (b, pspace, pc, section))
+	if (breakpoint_has_pc (b, pspace, pc, section) && b->number >= 0)
 	  {
 	    others--;
 	    printf_filtered ("%d", b->number);


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-09-15 12:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-20 13:44 [PATCH] Remove same-pc breakpoint notification for internal BPs Kevin Pouget
2011-04-20 13:57 ` Kevin Pouget
2011-04-20 19:03 ` Tom Tromey
2011-04-21  8:12   ` Kevin Pouget
2011-04-21  8:49     ` Pedro Alves
2011-04-21  9:25       ` Kevin Pouget
2011-04-21  9:34         ` Kevin Pouget
2011-04-21 14:17       ` Tom Tromey
2011-04-21 14:59         ` Pedro Alves
2011-04-21 15:06           ` Tom Tromey
2011-04-21 15:27             ` Pedro Alves
2011-04-27 13:03               ` Kevin Pouget
2011-08-31 13:18                 ` Kevin Pouget
2011-09-05 14:43                   ` Pedro Alves
2011-09-15 12:31                     ` Kevin Pouget

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox