This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: size of non local variables


>>>>> "Anmol" == Anmol P Paralkar <anmol@freescale.com> 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>  http://sourceware.org/gdb/current/onlinedocs/gdb/Functions-In-Python.html#Functions-In-Python
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:

http://tromey.com/blog/?p=494

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]