This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix handling of DWARF register pieces on big-endian targets
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Tue, 13 Jun 2017 15:21:44 -0400
- Subject: [binutils-gdb] Fix handling of DWARF register pieces on big-endian targets
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 03c8af18d1a8f359fd023696848bda488119da60 ***
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Branch: master
Commit: 03c8af18d1a8f359fd023696848bda488119da60
Fix handling of DWARF register pieces on big-endian targets
For big-endian targets the logic in read/write_pieced_value tries to take
a register piece from the LSB end. This requires offsets and sizes to be
adjusted accordingly, and that's where the current implementation has some
issues:
* The formulas for recalculating the bit- and byte-offsets into the
register are wrong. They just happen to yield correct results if
everything is byte-aligned and the piece's last byte belongs to the
given value.
* After recalculating the bit offset into the register, the number of
bytes to be copied from the register is not recalculated. Of course
this does not matter if everything (particularly the piece size) is
byte-aligned.
These issues are fixed. The size calculation is performed with a new
helper function bits_to_bytes().
gdb/ChangeLog:
* dwarf2loc.c (bits_to_bytes): New function.
(read_pieced_value): Fix offset calculations for register pieces
on big-endian targets.
(write_pieced_value): Likewise.
gdb/testsuite/ChangeLog:
* gdb.dwarf2/var-access.exp: Add test for non-byte-aligned
register pieces.
- Follow-Ups:
- Failures on Fedora-s390x-m64, branch master
- Failures on Ubuntu-AArch32-native-gdbserver-m32, branch master
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master
- Failures on Ubuntu-AArch64-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Ubuntu-AArch32-m32, branch master
- Failures on Ubuntu-AArch64-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-i686, branch master