Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Tristan Su <sooqing@gmail.com>
To: gdb@sourceware.org
Subject: can pahole print a struct definition in a given CU?
Date: Mon, 24 Dec 2012 14:15:00 -0000	[thread overview]
Message-ID: <CA+sbV4jqL=6=MV891x8tL0SvFAJno5x7PxRxTULtmsb0tVkZPA@mail.gmail.com> (raw)

Hi,
I found pahole (python api) quite useful but jusst could not have it
print a struct in a given compilation unit.
With the ptype command:
(gdb) ptype S
but we can also specify the CU because the struct may have different
define in different CUs.
(gdb) ptype 'foo.c'::S

but pahale doesn't seem to support this:
(gdb) pahole  'foo.c'::S
Traceback (most recent call last):
  File "/usr/share/gdb/python/gdb/command/pahole.py", line 68, in invoke
    type = gdb.lookup_type (arg)
RuntimeError: No type named 'foo.c'::S.
Error occurred in Python command: No type named 'foo.c'::S.

Is that possible/easy to make pahole support this?

I'm using gdb 7.2 on x86-64.

Thanks,
Tristan


             reply	other threads:[~2012-12-24 14:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-24 14:15 Tristan Su [this message]
2013-01-02 17:32 ` Tom Tromey
2013-01-02 18:56   ` Doug Evans
2013-01-02 19:05     ` Tom Tromey
2013-01-02 19:06     ` Doug Evans

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='CA+sbV4jqL=6=MV891x8tL0SvFAJno5x7PxRxTULtmsb0tVkZPA@mail.gmail.com' \
    --to=sooqing@gmail.com \
    --cc=gdb@sourceware.org \
    /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