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]

Re: Collecting description of types from symbol table


>>>>> "Vimal" == Vimal  <j.vimal@gmail.com> writes:

Vimal> I would like to dump the collect the output of the "ptype" command for
Vimal> all possible types that gdb is aware of.

Vimal> For example, the following output is very useful when debugging the
Vimal> kernel, and I would like to collect the output of all such types in
Vimal> the kernel for reference.   Could someone tell me rough ideas of how
Vimal> this is stored in the executable, and how to dump this?

Usually it is stored in DWARF format.
See http://dwarfstd.org/

Iterating over all the types, in gdb, is not trivial.
It could be done but you will have to write some C code to do it.

The 7 dwarves project would be an ok place to start for this though.
pahole nearly does it already.

Tom


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