This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Filter tracepoints out of bpstat
- From: Stan Shebs <stan at codesourcery dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 17 Dec 2009 16:37:24 -0800
- Subject: [PATCH] Filter tracepoints out of bpstat
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