[RFA] solib-svr4.c fetch link map address

Kevin Buettner kevinb@redhat.com
Wed Oct 2 20:24:00 GMT 2002


On Oct 2,  9:42pm, Elena Zannoni wrote:

> +/* Get the address of the link_map for a given OBJFILE.  Loop through
> +   the link maps, and return the address of the one corresponding to
> +   the given objfile.  Note that this function takes into account that
> +   objfile can be the main executable, not just a shared library.  The
> +   main executable has always an empty name field in the linkmap.  */

Since this is all sort of experimental at the moment, your patch is
okay.  I think we should revisit it at a later time so that we (re)use the
information that's already being fetched by solib-svr4.c.  (We'll need
to allocate some space for the link map address though.)

With regard to the main executable, it can either be saved separately,
or put on the so_list chain.

BTW, have you answered Daniel's question about how a gdbserver (or
some other debug agent) should fetch the link map address?  I.e,
is something like the qSymbol packet going to be needed?

Kevin



More information about the Gdb-patches mailing list