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

Nick Roberts
2008-02-05T00:36:51Z

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

That's what I had originally
(http://sourceware.org/ml/gdb-patches/2007-11/msg00262.html)

but Vladimir said:
(http://sourceware.org/ml/gdb-patches/2007-11/msg00266.html)

I believe that in a case of breakpoint with multiple locations, where
the first location is shlib_disabled, the updated code will print <PENDING>
as address, not <MULTIPLE>.

I think the right approach would be moving the check for loc->shlib_disabled
later, like this:
...

so I did this as he was the author of the original patch.

--
Nick http://www.inet.net.nz/~nickrob