Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: "Anmol P. Paralkar" <anmol@freescale.com>
Cc: ranjith kumar <ranjithproxy@gmail.com>, gdb@sourceware.org
Subject: Re: size of non local variables
Date: Tue, 01 Dec 2009 19:26:00 -0000	[thread overview]
Message-ID: <m3tywao5ql.fsf@fleche.redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0911301743520.12536@lds03-tx32> (Anmol 	P. Paralkar's message of "Mon, 30 Nov 2009 18:16:49 -0600 (CST)")

>>>>> "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


  reply	other threads:[~2009-12-01 19:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-30 20:39 ranjith kumar
2009-11-30 23:18 ` Anmol P. Paralkar
     [not found]   ` <31cff80d0911301246p6471c1a5ua95608d22b81a22a@mail.gmail.com>
2009-12-01  0:17     ` Anmol P. Paralkar
2009-12-01 19:26       ` Tom Tromey [this message]
2009-12-01 21:33         ` Anmol P. Paralkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3tywao5ql.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=anmol@freescale.com \
    --cc=gdb@sourceware.org \
    --cc=ranjithproxy@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox