aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.xml/tdesc-reload.exp6
-rw-r--r--gdb/testsuite/lib/gdb.exp10
2 files changed, 13 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.xml/tdesc-reload.exp b/gdb/testsuite/gdb.xml/tdesc-reload.exp
index 21dede8..b8ece6f 100644
--- a/gdb/testsuite/gdb.xml/tdesc-reload.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-reload.exp
@@ -29,9 +29,9 @@ if {![runto_main]} {
}
# Three files we're going to write out to.
-set xml_file_1 [standard_output_file outfile1.xml]
-set xml_file_2 [standard_output_file outfile2.xml]
-set xml_file_3 [standard_output_file outfile3.xml]
+set xml_file_1 [host_standard_output_file outfile1.xml]
+set xml_file_2 [host_standard_output_file outfile2.xml]
+set xml_file_3 [host_standard_output_file outfile3.xml]
# Write the current target description to a file.
gdb_test_no_output "pipe maint print xml-tdesc | cat > $xml_file_1" \
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 111a158..0a0ae69 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -6364,6 +6364,16 @@ proc standard_output_file {basename} {
return [file join $dir $basename]
}
+# Turn BASENAME into a file name on host.
+
+proc host_standard_output_file { basename } {
+ if { [is_remote host] } {
+ return $basename
+ } else {
+ return [standard_output_file $basename]
+ }
+}
+
# Turn BASENAME into a full file name in the standard output directory. If
# GDB has been launched more than once then append the count, starting with
# a ".1" postfix.