This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: (gdb-6.8) Discard breakpoint address if shared library is unloaded
- From: Nick Roberts <nickrob at snap dot net dot nz>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 5 Feb 2008 10:55:01 +1300
- Subject: Re: (gdb-6.8) Discard breakpoint address if shared library is unloaded
- References: <20080204214226.GF20922@adacore.com>
> As far as I could tell, the discussions pointed towards the idea
> of removing the address and replacing it with "<PENDING>". Can we
> expect to see a patch along these lines sometimes soon?
I think the patch below, based on my initial patch and Vladimir's subsequent
comment, will fix it. No regressions.
--
Nick http://www.inet.net.nz/~nickrob
*** breakpoint.c 04 Feb 2008 09:10:59 +1300 1.301
--- breakpoint.c 04 Feb 2008 09:11:02 +1300
*************** print_one_breakpoint_location (struct br
*** 3425,3434 ****
/* 4 */
annotate_field (3);
if (part_of_multiple)
! ui_out_field_string (uiout, "enabled",
! loc->shlib_disabled
! ? (loc->enabled ? "y(p)" : "n(p)")
! : (loc->enabled ? "y" : "n"));
else
{
int pending = (b->loc == NULL || b->loc->shlib_disabled);
--- 3425,3431 ----
/* 4 */
annotate_field (3);
if (part_of_multiple)
! ui_out_field_string (uiout, "enabled", loc->enabled ? "y" : "n");
else
{
int pending = (b->loc == NULL || b->loc->shlib_disabled);
*************** print_one_breakpoint_location (struct br
*** 3556,3561 ****
--- 3553,3560 ----
ui_out_field_string (uiout, "addr", "<PENDING>");
else if (header_of_multiple)
ui_out_field_string (uiout, "addr", "<MULTIPLE>");
+ else if (loc->shlib_disabled)
+ ui_out_field_string (uiout, "addr", "<PENDING>");
else
ui_out_field_core_addr (uiout, "addr", loc->address);
}