[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb
Subject:    can pahole print a struct definition in a given CU?
From:       Tristan Su <sooqing () gmail ! com>
Date:       2012-12-24 14:15:41
Message-ID: CA+sbV4jqL=6=MV891x8tL0SvFAJno5x7PxRxTULtmsb0tVkZPA () mail ! gmail ! com
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic