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


On Fri, 15 Jan 2010 20:49:35 +0100, Tom Tromey wrote:
> 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.

Such as even to non-Python struct printing which currently print:
	$1 = {pointer_type = 0x0, reference_type = 0x0, chain = 0x1dfaa40,
	instance_flags = 0, length = 36, main_type = 0x1dfaa70}


> 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.

yes.


Thanks,
Jan


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