New "info auxv" command and $auxv variable?

Andrew Cagney
2003-11-04T16:46:05Z

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.