Fix an internal error on writing pieced value
authorYao Qi <yao.qi@linaro.org>
Wed, 4 Jan 2017 09:32:46 +0000 (09:32 +0000)
committerYao Qi <yao.qi@linaro.org>
Wed, 4 Jan 2017 09:32:46 +0000 (09:32 +0000)
commit2aaaf250e80afb4a5c66fb0b7801e24cc5c4e680
tree662d674e201a43a4b38dec6ac5772fac40610814
parentc27e4edb52011c9f4bbdb141fb360c708a879f87
Fix an internal error on writing pieced value

In ee40d8d (Move computed value's frame id to piece_closure), I only
updated read_pieced_value to use frame_id from piece_closure, but
forgot to update write_pieced_value, so it causes the following
internal error on arm-linux,

set variable l = 4^M
gdb/git/gdb/value.c:1579: internal-error: frame_id* deprecated_value_next_frame_id_hack(value*): Assertion `value->lval == lval_register' failed.^M
A problem internal to GDB has been detected,^M
further debugging may prove unreliable.^M
Quit this debugging session? (y or n) FAIL: gdb.base/store.exp: var longest l; setting l to 4 (GDB internal error)

This patch fixes the internal error.

gdb:

2017-01-04  Yao Qi  <yao.qi@linaro.org>

* dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
gdb/ChangeLog
gdb/dwarf2loc.c