diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2025-03-11 15:02:46 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2025-03-13 12:09:28 -0400 |
commit | 51a093a5e907cb639ab4590e4b9f280c48e19a94 (patch) | |
tree | 541574b1bc965b50f06cc78c4e24f01eb793ab47 /gdb/python | |
parent | e8112abd3a1590820462f59af6db7cb1b6928da1 (diff) | |
download | binutils-51a093a5e907cb639ab4590e4b9f280c48e19a94.zip binutils-51a093a5e907cb639ab4590e4b9f280c48e19a94.tar.gz binutils-51a093a5e907cb639ab4590e4b9f280c48e19a94.tar.bz2 |
gdb/testsuite: fail less catastrophically in gdb.base/style.exp
On Debian 12, with gcc 12 and ld 2.40, I get some failures when running:
$ make check TESTS="gdb.base/style.exp" RUNTESTFLAGS="--target_board=fission"
I think I stumble on this bug [1], preventing to do the
disassembling that the test needs:
$ ./gdb -nx -q --data-directory=data-directory testsuite/outputs/gdb.base/style/style
Reading symbols from testsuite/outputs/gdb.base/style/style...
(gdb) x/1i *main
DW_FORM_strp pointing outside of .debug_str section [in module /home/smarchi/build/binutils-gdb/gdb/testsuite/outputs/gdb.base/style/style]
(gdb)
The regexp in get_single_disassembled_insn fails to match, the insn
variable doesn't get set, and we get one of those unreadable TCL stack
traces:
ERROR: tcl error sourcing /home/smarchi/src/binutils-gdb/gdb/testsuite/gdb.base/style.exp.
ERROR: tcl error code TCL READ VARNAME
ERROR: can't read "insn": no such variable
while executing
"return $insn"
(procedure "get_single_disassembled_insn" line 4)
invoked from within
"get_single_disassembled_insn"
("uplevel" body line 18)
invoked from within
"uplevel 1 $body"
invoked from within
...
Check the return value of the regexp call, return an empty string on
failure. Log a failure, so that we have a trace that something went
wrong, in case the tests done by the caller happen to pass by change.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111409
Change-Id: I5123d4cc0034da85a093a8531a22e972c10d94ca
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions