how to make gdb happy with my linkmap
Daniel Jacobowitz
drow@false.org
Thu Dec 18 21:49:00 GMT 2008
On Thu, Dec 18, 2008 at 10:41:20PM +0100, Mathieu Lacage wrote:
> hi,
>
> I am currently trying to write a small ELF loader and make gdb be
> happy with it.
On SVR4 systems, basically, you can't. There is some information you
won't be able to update because it lives in the kernel (auxilliary
vector). This is one of the reasons I recently implemented "set
wrapper"; if the loader is far enough along when GDB starts looking
at it, and has a link map already set up, then it will (generally)
not go poking around the auxilliary vector.
> Hence, my question: what are the requirements on the structure of a
> linkmap which is compatible with gdb's usage (beyond the mere ABI
> offset requirements).
I don't think this is possible to answer. The answer is that GDB is
written to work as best it can with all the system loaders we've
encountered. If there's a change that would make things easier for
your loader, without breaking any of those systems, you're welcome to
propose it :-)
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb
mailing list