Re: problem with fetch_link_map_offsets

Kevin Buettner
2003-04-29T15:07:01Z

On Apr 28, 4:21pm, Kris Warkentin wrote:
> All of a sudden I'm getting a complaint about "No shared lib support for
> this OS/ABI" from the new svr4_have_link_map_offsets function. When I
> initialize my backend tdep file, I set the fetch_link_map_offsets function.

Do you mean that you're calling set_solib_svr4_fetch_link_map_offsets()
from your _initialize_XXX_tdep() function? If so, that's not right. It
should be done either in the ABI initialization function (e.g. see
ppc_linux_init_abi in ppc-linux-tdep.c) or in your XXX_gdbarch_init
function.

> If I break on svr4_fetch_link_map_offsets, the first couple times I see that
> flmo is set to my function, then the third time it's been set back to
> legacy_fetch_link_map_offsets. I set a break on
> set_solib_svr4_fetch_link_map_offsets and see it being called with my
> function but it never gets called again between when I set it and when it
> shows up as changed.
>
> Can someone tell me where to set a watchpoint to catch the gdbarch data
> being set? I'm still a little shakey on how that all works.

Maybe...

current_gdbarch->data[fetch_link_map_offsets_gdbarch_data->index]

?

Something like this will probably work if you suspect that it's changing
after the fact. It probably won't work to see it initialized though.

You may also want to watch current_gdbarch to see when it changes. I
suspect that's the problem.

Kevin