aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-11-08 16:28:11 +0100
committerTom de Vries <tdevries@suse.de>2022-11-08 16:28:11 +0100
commite406987c476ebb229d04cd606bae2215386b189c (patch)
tree88472a52ca98e959f6488d60e50dcb98cc7c47e2
parent2756004fe78954754946b61d3f6338d8b72b8332 (diff)
downloadgdb-e406987c476ebb229d04cd606bae2215386b189c.zip
gdb-e406987c476ebb229d04cd606bae2215386b189c.tar.gz
gdb-e406987c476ebb229d04cd606bae2215386b189c.tar.bz2
[gdb/testsuite] Fix find_core_file for core named core
With test-case gdb.base/bigcore.exp I run into: ... (gdb) PASS: gdb.base/bigcore.exp: get inferior pid signal SIGABRT^M Continuing with signal SIGABRT.^M ^M Program terminated with signal SIGABRT, Aborted.^M The program no longer exists.^M (gdb) PASS: gdb.base/bigcore.exp: signal SIGABRT UNTESTED: gdb.base/bigcore.exp: can't generate a core file ... due to find_core_file returning "". There is a core file name core: ... $ ls ./outputs/gdb.base/bigcore bigcore bigcore.corefile core gdb.cmd.1 gdb.in.1 gdbserver.cmd.1 ... but it's not found. The problem is this statement: ... lappend files [list ${::testfile}.core core] ... which adds a single list item "${::testfile}.core core". Fix this in the most readable way: ... lappend files ${::testfile}.core lappend files core ... Tested on x86_64-linux.
-rw-r--r--gdb/testsuite/lib/gdb.exp3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index e2cda30..3e0a464 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -7736,7 +7736,8 @@ proc find_core_file {pid} {
} elseif {$pid != -1} {
lappend files core.$pid
}
- lappend files [list ${::testfile}.core core]
+ lappend files ${::testfile}.core
+ lappend files core
foreach file $files {
if {![is_remote host]} {