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]

can pahole print a struct definition in a given CU?


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


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