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: [URGENT] Ideas for Google Summer of Code


On Fri, 21 Feb 2014 19:24:48 +0100, Tom Tromey wrote:
> There's a bit in the delightfully-named gdb/gdb-gdb.py.
> At least for me it doesn't trigger by default though.

Do you have 'set auto-load safe-path' set?

gdb -iex "set auto-load safe-path $PWD/gdb-gdb.py" -ex 'set pagination off' -ex 'b value_type' -ex r -ex finish -ex 'p *$->main_type' --args ./gdb -ex 'ptype struct main_type' ./gdb
[...]
$2 = 
{name = 0x600400086a30 "int",
 tag_name = 0x0,
 code = TYPE_CODE_INT,
 flags = [],
 owner = 0x6062000e2310 (gdbarch),
 target_type = 0x0,
 vptr_basetype = 0x0,
 type_specific_field = TYPE_SPECIFIC_NONE}

Without gdb-gdb.py it would be:
$2 = {code = TYPE_CODE_INT, flag_unsigned = 0, flag_nosign = 0, flag_stub = 0, flag_target_stub = 0, flag_static = 0, flag_prototyped = 0, flag_incomplete = 0, flag_varargs = 0, flag_vector = 0, flag_stub_supported = 0, flag_gnu_ifunc = 0, flag_fixed_instance = 0, flag_objfile_owned = 0, flag_declared_class = 0, flag_flag_enum = 0, type_specific_field = TYPE_SPECIFIC_NONE, nfields = 0, vptr_fieldno = -1, name = 0x600400086a30 "int", tag_name = 0x0, owner = {objfile = 0x6062000e2310, gdbarch = 0x6062000e2310}, target_type = 0x0, flds_bnds = {fields = 0x0, bounds = 0x0}, vptr_basetype = 0x0, type_specific = {cplus_stuff = 0x0, gnat_stuff = 0x0, floatformat = 0x0, func_stuff = 0x0}}


Jan


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