This is the mail archive of the gdb-patches@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: [patch 1/2] gdb-gdb.py: Make the fields copy-paste friendly


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> (gdb) p *(struct type *) 0x1dfabf0

Jan> But such printing should be probably more integrated into the framework if
Jan> approved than doing it this way in each case.

Maybe a new option like "set print type" or "set print pointer-type"?
Then it could apply everywhere, not just to the gdb-specific
pretty-printers.

Jan> -        fields.append("main_type = %s" % self.val['main_type'])
Jan> +        fields.append("main_type = (%s) %s" % (self.val['main_type'].type, self.val['main_type']))

... and in conjunction, changing this to just return values rather than
doing the formatting by hand.

Tom


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