[Dwarf-Discuss] the list of 'local' variables

Tom Tromey tromey at redhat.com
Sat Jul 17 11:00:36 PDT 2010


>>>>> "Mathieu" == Mathieu Lacage <mathieu.lacage at gmail.com> writes:

Mathieu> The next step for me is digging in the gdb source tree to figure out
Mathieu> how it implements this but maybe someone who knows better can save me
Mathieu> a lot of time by giving me a rough outline of how this is expected to
Mathieu> be done.

First, what Michael said :-)

GDB has an "info scope" command that prints exactly this.

However, if you want to write your own standalone tool, reading GDB
will probably be harder than working it out from the DWARF standard.
Because GDB supports multiple formats, everything is first translated
into an internal form.

If you just need to get something done, you could script GDB with
Python.

Tom



More information about the Dwarf-Discuss mailing list