size of non local variables

Tom Tromey
Tue Dec 1 19:26:00 GMT 2009

>>>>> "Anmol" == Anmol P Paralkar <> writes:

Anmol>  On the other hand, GDB Guru's, is there a way one could get a
Anmol>  list of a program's symbols into a list and map over that list,
Anmol>  a function that takes a symbol as an argument and returns an
Anmol>  integer representing it's size? etc...

Anmol>  I tried looking at the Python support documentation to see if
Anmol>  this could be done easily, but could not really tell (I've never
Anmol>  used GDB's Python support nor Python).

I don't believe the Python symbol table code has been merged yet.  And
even on the branch in archer I'm not sure whether this can be done.

Anmol>  Is there a mini-tutorial somewhere that has an example of
Anmol>  getting started with using GDB's Python support? I tried trying
Anmol>  out the Greet snippet here:
Anmol>  but I'm not sure what I'm doing wrong.

If that didn't work, could you be more specific?  How did it fail, etc?

I wrote a series of blog entries about the python work a while back.
This may be the closest thing to a tutorial; however, some details of
the API have changed since then, so you would have to read it in
conjunction with the gdb manual:


More information about the Gdb mailing list