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

Joel Brobecker
2008-02-05T00:21:38Z

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

And I forgot. You can also avoid some code duplication by changing:

Index: breakpoint.c
===================================================================
--- breakpoint.c (revision 146)
+++ breakpoint.c (working copy)
@@ -3506,7 +3506,7 @@ print_one_breakpoint_location (struct br
if (addressprint)
{
annotate_field (4);
- if (b->loc == NULL)
+ if (b->loc == NULL || loc->shlib_disabled)
ui_out_field_string (uiout, "addr", "<PENDING>");
else if (header_of_multiple)
ui_out_field_string (uiout, "addr", "<MULTIPLE>");

--
Joel