aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2023-03-27 13:58:10 +0200
committerTom de Vries <tdevries@suse.de>2023-03-27 13:58:10 +0200
commit623f8c6b88161ea272137a5d6f5df8aada2e1656 (patch)
tree15067ecd26d14fec0026cdc511e60b96207c5af3
parent468f212c5779d1c6ad68a5add2c41a862255ca25 (diff)
downloadgdb-623f8c6b88161ea272137a5d6f5df8aada2e1656.zip
gdb-623f8c6b88161ea272137a5d6f5df8aada2e1656.tar.gz
gdb-623f8c6b88161ea272137a5d6f5df8aada2e1656.tar.bz2
[gdb/testsuite] Fix gdb.dwarf2/gdb-index-cxx.exp for remote host
Fix test-case gdb.dwarf2/gdb-index-cxx.exp for remote host using host_standard_output_file. Tested on x86_64-linux.
-rw-r--r--gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp2
-rw-r--r--gdb/testsuite/lib/gdb.exp3
2 files changed, 4 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp
index 3c3d6cc..6fffc98 100644
--- a/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp
+++ b/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp
@@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" "${testfile}" \
}
# The bug was that gdb would crash when saving.
-set output_dir [standard_output_file ""]
+set output_dir [host_standard_output_file ""]
set cmd "save gdb-index"
gdb_test_multiple "$cmd $output_dir" $cmd {
-re -wrap "Cannot use an index to create the index.*" {
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 39ed5ad..14ce39e 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -6414,6 +6414,9 @@ proc host_standard_output_file { basename } {
if { [is_remote host] } {
set remotedir [board_info host remotedir]
if { $remotedir == "" } {
+ if { $basename == "" } {
+ return "."
+ }
return $basename
} else {
return [join [list $remotedir $basename] "/"]