Re: [patch] Fix a crash when displaying variables from shared library.

Joel Brobecker
2009-03-20T19:54:21Z

> 2009-03-11 Paul Pluzhnikov <ppluzhnikov@google.com>
>
> * breakpoint.c (disable_breakpoints_in_shlibs): Use
> solib_contains_address_p instead of searching.

Unfortunately, we can't apply this patch just yet, because of:

> -#ifdef PC_SOLIB
> - char *so_name = PC_SOLIB (loc->address);
> -#else

There is still one architecture that uses PC_SOLIB (ppc-aix) :-(.
I wonder if I might be able to work on this sometime soon. There
are a whole bunch of macros that we could get rid of on AIX.

Also, I have a couple of questions:

> - && !loc->shlib_disabled
> + && !loc->shlib_disabled

I can't figure out what the change was in this case. The lines
look completely identical. I suspect a change in white-spaces,
but I couldn't see any.

> - && !loc->shlib_disabled)
> + && !loc->shlib_disabled
> + && (b->type == bp_breakpoint || b->type == bp_hardware_breakpoint)
> + && solib_contains_address_p (solib, loc->address))

I am wondering why you are checking the breakpoint type in addition
to the location type. In particular, I'm trying to figure out whether
it's possible to have a b->type that's not a breakpoint if loc->type
is a breakpoint. Also, we weren't making that check before, so what
did you see that made it you do it now?

--
Joel