write_pieced_value: Transfer least significant bits into bit-field
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Tue, 13 Jun 2017 13:20:28 +0000 (15:20 +0200)
committerAndreas Arnez <arnez@linux.vnet.ibm.com>
Tue, 13 Jun 2017 13:20:28 +0000 (15:20 +0200)
commit359b19bb24d048750aa5367ad56a33267300d1a8
tree9800233b2b0006daea892080c84f6eaaaaa18c2f
parent07c9ca3bd8e6f83bcec49c922b52422c538f60f7
write_pieced_value: Transfer least significant bits into bit-field

On big-endian targets, when targeting a bit-field, write_pieced_value
currently transfers the source value's *most* significant bits to the
target value, instead of its least significant bits.  This is fixed.

In particular the fix adjusts the initial value of 'offset', which can now
potentially be nonzero.  Thus the variable 'type_len' is renamed to
'max_offset', to avoid confusion.  And for consistency, the affected logic
that was mirrored in read_pieced_value is changed there in the same way.

gdb/ChangeLog:

* dwarf2loc.c (write_pieced_value): When writing to a bit-field,
transfer the source value's least significant bits, instead of its
lowest-addressed ones.  Rename type_len to max_offset.
(read_pieced_value): Mirror above changes to write_pieced_value as
applicable.
gdb/ChangeLog
gdb/dwarf2loc.c
This page took 0.028245 seconds and 4 git commands to generate.