This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] solib-svr4.c fetch link map address
On Wed, Oct 02, 2002 at 08:24:40PM -0700, Kevin Buettner wrote:
> 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?
Yes. We're going to have to find a way to give the link map offset to
the server; I'm not sure if the qSymbol model is best or not but I need
to think about the control flow. When I have time I'll come back to
this; I'd like it to work :)
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer