This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
New "info auxv" command and $auxv variable?
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb at sources dot redhat dot com
- Date: Tue, 04 Nov 2003 11:46:00 -0500
- Subject: New "info auxv" command and $auxv variable?
Hello,
In implementing a mechanism to query values from the the target's AUXV
(/proc/$$/auxv) I decided I might as well add a generic command:
(gdb) info auxv
Entry point 0x1234
...
(gdb)
that listed the contents of the processes auxv table.
But why stop there? What about a builtin $auxv variable, a struct, vis:
(gdb) print $auxv
$1 = { entry = 0x1234, ... }
Oh, and I guess:
(gdb) interpreter mi --info-auxv
^ok,result={entry="0x1234",...}
Thoughts?
Andrew
PS: Can any one point me at an official GNU/Linux or, I guess *BSD,
distro that supports /proc/$$/auxv? So far I've only got Solaris :-/
PPS: The second one is actually tricky. It requires a type bound to the
lifetime of the inferior - it is only in querying the inferior that the
fields can be determined. An alternative would be to always create the
type and then shove it into a type system bcache - ensuring that only
one struct of that form exists.