public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix gdb.dwarf2/gdb-index-cxx.exp for remote host
@ 2023-03-27 11:58 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-03-27 11:58 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=623f8c6b88161ea272137a5d6f5df8aada2e1656
commit 623f8c6b88161ea272137a5d6f5df8aada2e1656
Author: Tom de Vries <tdevries@suse.de>
Date: Mon Mar 27 13:58:10 2023 +0200
[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.
Diff:
---
gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp | 2 +-
gdb/testsuite/lib/gdb.exp | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp b/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp
index 3c3d6cc463d..6fffc982722 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 39ed5ad761b..14ce39e8ed7 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] "/"]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-03-27 11:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-27 11:58 [binutils-gdb] [gdb/testsuite] Fix gdb.dwarf2/gdb-index-cxx.exp for remote host Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).