[Dwarf-Discuss] global variable lookup

Michael Eager eager@eagercon.com
Sat Jul 17 11:11:08 GMT 2010

Saurabh wrote:
> I am trying to enumerate externs/globals by looking at the dwarf info. 
> Couldn't follow what pglobal is doing.

I have no idea what "pglobal" refers to.

> Should I look at all DIE's and filter out the one's with DW_AT_external = 1

That should tell you which variables or subroutines are
visible outside their compilation unit, i.e. global.
If all you need are the names of global symbols, the
ELF symbol table can provide that.

Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077

More information about the Dwarf-discuss mailing list