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
commitb54e6df085a3a3c0a86d9e19419d8b4cfa3e5055 (patch)
tree5f668fef49c3b1f91a19ec9fc0612df49bf2fb30
parentb2793801454182768d753d57225c296e1c4dbf5b (diff)
downloadbinutils-b54e6df085a3a3c0a86d9e19419d8b4cfa3e5055.zip
binutils-b54e6df085a3a3c0a86d9e19419d8b4cfa3e5055.tar.gz
binutils-b54e6df085a3a3c0a86d9e19419d8b4cfa3e5055.tar.bz2
[gdb/testsuite] Fix gdb.dwarf2/imported-unit-bp-c.exp for remote host
Fix test-case gdb.dwarf2/imported-unit-bp-c.exp on remote by removing a downloaded source file. Tested on x86_64-linux.
-rw-r--r--gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
index 6bef2bd..62dee7d 100644
--- a/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
+++ b/gdb/testsuite/gdb.dwarf2/imported-unit-bp.exp.tcl
@@ -122,5 +122,10 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
gdb_reinitialize_dir /tmp
+# Compilation on remote host downloads the source files to remote host, but
+# doesn't clean them up, allowing gdb to find $srcfile, in contrast to
+# non-remote host.
+remote_file host delete $srcfile
+
# Using an absolute path is important to see the bug.
gdb_test "break /tmp/${srcfile}:19" "Breakpoint .* file $srcfile, line .*"