aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2025-02-04 10:34:39 +0100
committerTom de Vries <tdevries@suse.de>2025-02-04 10:34:39 +0100
commitb8b7b2d038e808c4943ed4d0079c7caf5103da37 (patch)
treec7b7d6cf5f9f2e978601c013158134e7bef4d833
parent9cc62187b4bcc5ddac456043f55542484f6fada3 (diff)
downloadbinutils-b8b7b2d038e808c4943ed4d0079c7caf5103da37.zip
binutils-b8b7b2d038e808c4943ed4d0079c7caf5103da37.tar.gz
binutils-b8b7b2d038e808c4943ed4d0079c7caf5103da37.tar.bz2
[gdb/testsuite] Fix gdb.base/list-dot-nodebug.exp on openSUSE
On openSUSE Leap 15.6 with test-case gdb.base/list-dot-nodebug.exp I run into: ... (gdb) list .^M warning: 1 ../sysdeps/x86_64/crtn.S: No such file or directory^M (gdb) FAIL: $exp: debug=none: print before start ... The intent of the debug=none case is to generate an executable with no debug info. However, we have quite a few CUs with debug info: ... $ readelf -wi outputs/gdb.base/list-dot-nodebug/list-dot-nodebug-none \ | egrep -c " @ " 431 ... This is because this code: ... gdb_gnu_strip_debug $executable no-debuglink ... uses $executable, and the variable is set here: ... set executable ${testfile}-none ... which sets it to "list-dot-nodebug-none" and consequently gdb_gnu_strip_debug cannot find it. Fix this by using "[standard_output_file $executable]" instead. Tested on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com> PR testsuite/31721 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31721
-rw-r--r--gdb/testsuite/gdb.base/list-dot-nodebug.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/list-dot-nodebug.exp b/gdb/testsuite/gdb.base/list-dot-nodebug.exp
index b7359be..107669d 100644
--- a/gdb/testsuite/gdb.base/list-dot-nodebug.exp
+++ b/gdb/testsuite/gdb.base/list-dot-nodebug.exp
@@ -55,7 +55,7 @@ foreach_with_prefix debug {"none" "some"} {
# Stripping is a backup in case the system has static libc debuginfo.
# We can continue the test even if it fails.
- gdb_gnu_strip_debug $executable no-debuglink
+ gdb_gnu_strip_debug [standard_output_file $executable] no-debuglink
clean_restart ${executable}