|
|
e1d87d |
commit 07c9ca3bd8e6f83bcec49c922b52422c538f60f7
|
|
|
e1d87d |
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
|
e1d87d |
Date: Tue Jun 13 15:20:28 2017 +0200
|
|
|
e1d87d |
|
|
|
e1d87d |
write_pieced_value: Fix buffer offset for memory pieces
|
|
|
e1d87d |
|
|
|
e1d87d |
In write_pieced_value, when transferring the data to target memory via a
|
|
|
e1d87d |
buffer, the bit offset within the target value is not reduced to its
|
|
|
e1d87d |
sub-byte fraction before using it as a bit offset into the buffer. This
|
|
|
e1d87d |
is fixed.
|
|
|
e1d87d |
|
|
|
e1d87d |
gdb/ChangeLog:
|
|
|
e1d87d |
|
|
|
e1d87d |
* dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
|
|
|
e1d87d |
truncate full bytes from dest_offset_bits before using it as an
|
|
|
e1d87d |
offset into the buffer.
|
|
|
e1d87d |
|
|
|
e1d87d |
### a/gdb/ChangeLog
|
|
|
e1d87d |
### b/gdb/ChangeLog
|
|
|
e1d87d |
## -1,5 +1,11 @@
|
|
|
e1d87d |
2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
|
e1d87d |
|
|
|
e1d87d |
+ * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
|
|
|
e1d87d |
+ truncate full bytes from dest_offset_bits before using it as an
|
|
|
e1d87d |
+ offset into the buffer.
|
|
|
e1d87d |
+
|
|
|
e1d87d |
+2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
|
|
|
e1d87d |
+
|
|
|
e1d87d |
* dwarf2loc.c (write_pieced_value): Include transfer size in
|
|
|
e1d87d |
byte-wise check.
|
|
|
e1d87d |
|
|
|
e1d87d |
--- a/gdb/dwarf2loc.c
|
|
|
e1d87d |
+++ b/gdb/dwarf2loc.c
|
|
|
e1d87d |
@@ -2058,7 +2058,7 @@ write_pieced_value (struct value *to, struct value *from)
|
|
|
e1d87d |
read_memory (p->v.mem.addr + dest_offset, buffer.data (), 1);
|
|
|
e1d87d |
read_memory (p->v.mem.addr + dest_offset + this_size - 1,
|
|
|
e1d87d |
&buffer[this_size - 1], 1);
|
|
|
e1d87d |
- copy_bitwise (buffer.data (), dest_offset_bits,
|
|
|
e1d87d |
+ copy_bitwise (buffer.data (), dest_offset_bits % 8,
|
|
|
e1d87d |
contents, source_offset_bits,
|
|
|
e1d87d |
this_size_bits,
|
|
|
e1d87d |
bits_big_endian);
|