This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb/gdb-8.1-branch] Fix scm-ports.exp regression
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Mon, 15 Jan 2018 17:31:35 -0500
- Subject: [binutils-gdb/gdb-8.1-branch] Fix scm-ports.exp regression
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 5429afd6529f3a7dc7d733fc21053ca3ecadd033 ***
Author: Tom Tromey <tom@tromey.com>
Branch: gdb-8.1-branch
Commit: 5429afd6529f3a7dc7d733fc21053ca3ecadd033
Fix scm-ports.exp regression
In https://sourceware.org/ml/gdb-patches/2017-12/msg00215.html, Jan
pointed out that the scalar printing patches caused a regression in
scm-ports.exp on x86.
What happens is that on x86, this:
set sp_reg [get_integer_valueof "\$sp" 0]
... ends up setting sp_reg to a negative value, because
get_integer_valueof uses "print/d":
print /d $sp
$1 = -11496
Then later the test suite does:
gdb_test "guile (print (seek rw-mem-port (value->integer sp-reg) SEEK_SET))" \
"= $sp_reg" \
"seek to \$sp"
... expecting this value to be identical to the saved $sp_reg value.
However it gets:
guile (print (seek rw-mem-port (value->integer sp-reg) SEEK_SET))
= 4294955800
"print" is just a wrapper for guile's format:
gdb_test_no_output "guile (define (print x) (format #t \"= ~A\" x) (newline))"
The seek function returns a scm_t_off, the printing of which is
handled by guile, not by gdb.
Tested on x86-64 Fedora 26 using an ordinary build and also a -m32
build.
2018-01-15 Tom Tromey <tom@tromey.com>
* gdb.guile/scm-ports.exp (test_mem_port_rw): Use get_valueof to
compute sp_reg.
- Follow-Ups:
- Failures on Fedora-i686, branch gdb-8.1-branch
- Failures on Fedora-x86_64-m32, branch gdb-8.1-branch
- Failures on Fedora-x86_64-native-gdbserver-m32, branch gdb-8.1-branch
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch gdb-8.1-branch
- Failures on Ubuntu-AArch64-native-gdbserver-m64, branch gdb-8.1-branch
- Failures on Fedora-x86_64-cc-with-index, branch gdb-8.1-branch
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch gdb-8.1-branch
- Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.1-branch
- Failures on Fedora-x86_64-m64, branch gdb-8.1-branch
- Failures on Ubuntu-AArch64-m64, branch gdb-8.1-branch
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch gdb-8.1-branch
- Failures on Ubuntu-AArch32-native-gdbserver-m32, branch gdb-8.1-branch
- Failures on Ubuntu-AArch32-m32, branch gdb-8.1-branch