This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: set_value_component_location in apply_val_pretty_printer
- From: Tom Tromey <tom at tromey dot com>
- To: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- Cc: qiyaoltc at gmail dot com (Yao Qi), gdb-patches at sourceware dot org (gdb-patches at sourceware dot org), tom at tromey dot com (Tom Tromey)
- Date: Sun, 30 Oct 2016 21:05:57 -0600
- Subject: Re: set_value_component_location in apply_val_pretty_printer
- Authentication-results: sourceware.org; auth=none
- References: <20161028185834.0145C10B927@oc8523832656.ibm.com>
>>>>> "Ulrich" == Ulrich Weigand <uweigand@de.ibm.com> writes:
>> It was added by Tom in
>> https://sourceware.org/ml/gdb-patches/2010-06/msg00132.html
>> There wasn't much information in email and ChangeLog.
What Ulrich wrote is better than anything I was likely to write.
Ulrich> That's why all the val_print routines not just receive the
Ulrich> original value object (which remains unchanged even while
Ulrich> recursing through subobjects), but also an idenfication of
Ulrich> the subobject that is to be processed: this is a pair of
Ulrich> offset and type, and means, the subobject of type "type"
Ulrich> starting at offset "offset" within the larger object.
I've thought for a long time that val_print should just be removed, and
only full values should be passed around.
Tom