Re: (gdb-6.8) Discard breakpoint address if shared library is unloaded

Nick Roberts
2008-02-04T21:55:44Z

> 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);
}