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: set_value_component_location in apply_val_pretty_printer


On Mon, Nov 21, 2016 at 2:14 PM, Yao Qi <qiyaoltc@gmail.com> wrote:
>
> -  if (VALUE_LVAL (array) == lval_memory && value_lazy (array))
> -    v = allocate_value_lazy (elt_type);
> -  else
> -    {
> -      v = allocate_value (elt_type);
> -      value_contents_copy (v, value_embedded_offset (v),
> -                          array, value_embedded_offset (array) + elt_offs,
> -                          elt_size);
> -    }
> -
> -  set_value_component_location (v, array);
> -  VALUE_REGNUM (v) = VALUE_REGNUM (array);
> -  VALUE_NEXT_FRAME_ID (v) = VALUE_NEXT_FRAME_ID (array);
> -  set_value_offset (v, value_offset (array) + elt_offs);
> -  return v;
> +  return value_from_component (array, elt_type, elt_offs);
>  }
>
>

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.

-- 
Yao (齐尧)


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