Pending breakpoints
Nick Roberts
nickrob@snap.net.nz
Tue Feb 26 20:24:00 GMT 2008
I still think "info break" isn't quite right for pending breakpoints. This
isn't about previous behaviour, just missing infoemation. Currently:
(gdb) b sqrt
Function "sqrt" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (sqrt) pending.
(gdb) info break
Num Type Disp Enb Address What
1 breakpoint keep y <PENDING> sqrt
(gdb) start
Breakpoint 2 at 0x804862c: file myprog.c, line 95.
Starting program: /home/nickrob/myprog
main (argc=1, argv=0xbff1d1e4) at myprog.c:95
95 main (int argc, char **argv) {
(gdb) info break
Num Type Disp Enb Address What
1 breakpoint keep y 0xb7f52114 <sqrt+4>
(gdb) nosharedlibrary
(gdb) info break
Num Type Disp Enb Address What
1 breakpoint keep y <PENDING>
and the last "info break" no longer says what the breakpoint is for. I don't
really know when you would unload the shared library, in practice, but I think
this line should look like the first output from "info break", i.e., include
sqrt.
The patch below does that. It's a bit of a guess, though, and I've not run
the testuite.
--
Nick http://www.inet.net.nz/~nickrob
*** breakpoint.c 26 Feb 2008 21:24:24 +1300 1.303
--- breakpoint.c 26 Feb 2008 22:42:54 +1300
*************** static void print_breakpoint_location (s
*** 3311,3317 ****
ui_out_field_int (uiout, "line", b->line_number);
}
! else if (!b->loc)
{
ui_out_field_string (uiout, "pending", b->addr_string);
}
--- 3311,3317 ----
ui_out_field_int (uiout, "line", b->line_number);
}
! else if (!b->loc || loc->shlib_disabled)
{
ui_out_field_string (uiout, "pending", b->addr_string);
}
More information about the Gdb-patches
mailing list