[PATCH] Filter tracepoints out of bpstat

Stan Shebs stan@codesourcery.com
Fri Dec 18 00:37:00 GMT 2009


It can happen that if a breakpoint and tracepoint are at the same 
address and the breakpoint is hit, GDB gets confused and ultimately 
internal-errors in bpstat_what.  This patch simply dismisses apparent 
tracepoint hits as not being possible, which lets GDB go on to interpret 
the stop correctly.

Committed to trunk.

Stan

2009-12-17  Stan Shebs  <stan@codesourcery.com>

    * breakpoint.c (bpstat_check_location): Check for tracepoints.

Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.438
diff -p -r1.438 breakpoint.c
*** breakpoint.c    3 Dec 2009 17:47:07 -0000    1.438
--- breakpoint.c    18 Dec 2009 00:21:53 -0000
*************** bpstat_check_location (const struct bp_l
*** 3306,3311 ****
--- 3306,3316 ----
  {
    struct breakpoint *b = bl->owner;
 
+   /* By definition, the inferior does not report stops at
+      tracepoints.  */
+   if (b->type == bp_tracepoint)
+     return 0;
+
    if (b->type != bp_watchpoint
        && b->type != bp_hardware_watchpoint
        && b->type != bp_read_watchpoint





More information about the Gdb-patches mailing list