set_value_component_location in apply_val_pretty_printer
Commit Message
On Mon, Nov 21, 2016 at 08:37:24PM +0000, Yao Qi wrote:
> On Mon, Nov 21, 2016 at 06:23:47PM +0000, Yao Qi wrote:
> > I removed the code setting VALUE_NEXT_FRAME_ID, but
> > value_from_component only sets VALUE_FRAME_ID. The change
> > above is not equivalent, and it causes some regressions in
> > https://sourceware.org/ml/gdb-testers/2016-q4/msg03381.html
> >
> > Sorry about that. The fix would be setting both
> > VALUE_NEXT_FRAME_ID and VALUE_FRAME_ID in
> > value_from_component. I'll give a fix.
> >
>
> Oh, looks we renamed VALUE_FRAME_ID to VALUE_NEXT_FRAME_ID recently,
> https://sourceware.org/ml/gdb-patches/2016-11/msg00018.html
> and I regression tested against a copy of one-week-old gdb, but
> didn't see the regression. The fix would be replacing VALUE_FRAME_ID
> with VALUE_NEXT_FRAME_ID in my patch. Testing the fix...
>
The patch below fixes the regressions by replacing VALUE_FRAME_ID
with VALUE_NEXT_FRAME_ID in value_from_component. I pushed it in.
@@ -1,3 +1,8 @@
+2016-11-22 Yao Qi <yao.qi@linaro.org>
+
+ * value.c (value_from_component): Use VALUE_NEXT_FRAME_ID
+ instead of VALUE_FROM_ID.
+
2016-11-21 Simon Marchi <simon.marchi@ericsson.com>
* Makefile.in (%o: $(srcdir)/mi/%.c): Add missing POSTCOMPILE
@@ -3815,7 +3815,7 @@ value_from_component (struct value *whole, struct type *type, LONGEST offset)
v->offset = value_offset (whole) + offset + value_embedded_offset (whole);
set_value_component_location (v, whole);
VALUE_REGNUM (v) = VALUE_REGNUM (whole);
- VALUE_FRAME_ID (v) = VALUE_FRAME_ID (whole);
+ VALUE_NEXT_FRAME_ID (v) = VALUE_NEXT_FRAME_ID (whole);
return v;
}