diff options
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/gdb-index.exp')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/gdb-index.exp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/gdb-index.exp b/gdb/testsuite/gdb.dwarf2/gdb-index.exp index ebeb62b..41bd480 100644 --- a/gdb/testsuite/gdb.dwarf2/gdb-index.exp +++ b/gdb/testsuite/gdb.dwarf2/gdb-index.exp @@ -98,20 +98,24 @@ set test "check if index present" set filter "gdb_index|debug_names|Psymtabs|Cooked" set cmd "pipe mt print objfiles ${testfile} | grep -E \"$filter\"" set cmd_re [string_to_regexp $cmd] +set testfile_with_index bla gdb_test_multiple $cmd $test { -re ^$cmd_re { exp_continue } -re "gdb_index.*${gdb_prompt} $" { - set binfile_with_index $binfile + set testfile_with_index $testfile + set binfile_with_index [standard_output_file $testfile_with_index] set host_binfile_with_index [gdb_remote_download host $binfile] } -re "debug_names.*${gdb_prompt} $" { - set binfile_with_index $binfile + set testfile_with_index $testfile + set binfile_with_index [standard_output_file $testfile_with_index] set host_binfile_with_index [gdb_remote_download host $binfile] } -re "(Psymtabs|Cooked).*${gdb_prompt} $" { lassign [local_add_gdb_index $binfile] binfile_with_index host_binfile_with_index + set testfile_with_index [file tail $binfile_with_index] if { ${binfile_with_index} == "" } { return -1 } @@ -124,7 +128,7 @@ gdb_test_multiple $cmd $test { # Ok, we have a copy of $binfile with an index. # Restart gdb and verify the index was used. -clean_restart ${binfile_with_index} +clean_restart $testfile_with_index gdb_test "mt print objfiles ${testfile}" \ "(gdb_index|debug_names).*" \ "index used" @@ -140,7 +144,7 @@ if {[run_on_host "touch binary" touch $host_binfile_with_index]} { return -1 } -if ![runto_main] { +if {![runto_main]} { return -1 } gdb_test "mt print objfiles ${testfile}" \ |