diff options
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-basic.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-compressed.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-intercu.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-intermix.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-producer.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/mac-fileno.exp | 3 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 12 |
8 files changed, 34 insertions, 6 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f32933885d..c826d4e3d2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,15 @@ 2013-08-22 Tom Tromey <tromey@redhat.com> + * gdb.dwarf2/dw2-basic.exp: Use gdb_remote_download. + * gdb.dwarf2/dw2-compressed.exp: Use gdb_remote_download. + * gdb.dwarf2/dw2-intercu.exp: Use gdb_remote_download. + * gdb.dwarf2/dw2-intermix.exp: Use gdb_remote_download. + * gdb.dwarf2/dw2-producer.exp: Use gdb_remote_download. + * gdb.dwarf2/mac-fileno.exp: Use gdb_remote_download. + * lib/gdb.exp (gdb_remote_download): New proc. + +2013-08-22 Tom Tromey <tromey@redhat.com> + * gdb.dwarf2/clztest.exp: Use standard_testfile. * gdb.dwarf2/dw2-minsym-in-cu.exp: Use standard_testfile. * gdb.dwarf2/fission-base.S: Remove directory from diff --git a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp index a6f1d029de..0a935cba6e 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp @@ -29,7 +29,8 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}] +set remote_dwarf_srcfile [gdb_remote_download host \ + ${srcdir}/${subdir}/${dwarf_srcfile}] gdb_test_no_output "set listsize 1" gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4" diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp index ff3b8786ae..7f7a17a3ac 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp @@ -31,7 +31,8 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}] +set remote_dwarf_srcfile [gdb_remote_download host \ + ${srcdir}/${subdir}/${dwarf_srcfile}] gdb_test_no_output "set listsize 1" gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4" diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp index 1d7e852cfe..6f603c0e99 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp @@ -29,7 +29,8 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}] +set remote_dwarf_srcfile [gdb_remote_download host \ + ${srcdir}/${subdir}/${dwarf_srcfile}] # This needs to be done first so that the CU for int2 gets expanded first. # This exercises the case where the type for this die is hashed, but we diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp index f2ebef1114..5f14fae8cd 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp @@ -29,7 +29,8 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}] +set remote_dwarf_srcfile [gdb_remote_download host \ + ${srcdir}/${subdir}/${dwarf_srcfile}] gdb_test_no_output "set listsize 1" gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4" diff --git a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp index 86154ba6ba..383e25bf62 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp @@ -27,7 +27,8 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}] +set remote_dwarf_srcfile [gdb_remote_download host \ + ${srcdir}/${subdir}/${dwarf_srcfile}] gdb_test_no_output "set listsize 1" gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4" diff --git a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp index 71999eb1e9..48415fdd86 100644 --- a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp +++ b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp @@ -30,7 +30,8 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [remote_download host ${srcdir}/${subdir}/${dwarf_srcfile}] +set remote_dwarf_srcfile [gdb_remote_download host \ + ${srcdir}/${subdir}/${dwarf_srcfile}] gdb_test_no_output "set listsize 1" gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index a2f6a8f2ee..52d369ca0d 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3263,6 +3263,18 @@ proc gdb_touch_execfile { binfile } { } } +# Like remote_download but provides a gdb-specific behavior. If DEST +# is "host", and the host is not remote, and TOFILE is not specified, +# then the [file tail] of FROMFILE is passed through +# standard_output_file to compute the destination. + +proc gdb_remote_download {dest fromfile {tofile {}}} { + if {$dest == "host" && ![is_remote host] && $tofile == ""} { + set tofile [standard_output_file [file tail $fromfile]] + } + return [remote_download $dest $fromfile $tofile] +} + # gdb_download # # Copy a file to the remote target and return its target filename. |