public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* can pahole print a struct definition in a given CU?
@ 2012-12-24 14:15 Tristan Su
  2013-01-02 17:32 ` Tom Tromey
  0 siblings, 1 reply; 5+ messages in thread
From: Tristan Su @ 2012-12-24 14:15 UTC (permalink / raw)
  To: gdb

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-02 19:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-24 14:15 can pahole print a struct definition in a given CU? Tristan Su
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).