This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 1/2] gdb-gdb.py: Make the fields copy-paste friendly
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 15 Jan 2010 12:49:35 -0700
- Subject: Re: [patch 1/2] gdb-gdb.py: Make the fields copy-paste friendly
- References: <20100115192840.GB4324@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "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