From: Tom de Vries Date: Sat, 4 Aug 2018 21:42:53 +0000 (+0000) Subject: [testsuite, guality] Use absolute line number in pass/fail line X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d3e5ba2622feb993d38d805c73fbcae8397a943;p=gcc.git [testsuite, guality] Use absolute line number in pass/fail line 2018-08-04 Tom de Vries * lib/gcc-gdb-test.exp: Use absolute line number in pass/fail line. From-SVN: r263311 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8bf5eaf9919..a1f3b5bdcad 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-08-04 Tom de Vries + + * lib/gcc-gdb-test.exp: Use absolute line number in pass/fail line. + 2018-08-04 Andreas Schwab * gcc.dg/guality/const-volatile.c: Remove duplicate test diff --git a/gcc/testsuite/lib/gcc-gdb-test.exp b/gcc/testsuite/lib/gcc-gdb-test.exp index b13d3ec7f85..0066e157b42 100644 --- a/gcc/testsuite/lib/gcc-gdb-test.exp +++ b/gcc/testsuite/lib/gcc-gdb-test.exp @@ -54,18 +54,19 @@ proc gdb-test { useline args } { set var $arg1 } - set gdb_name $::env(GUALITY_GDB_NAME) - set testname "$testcase line [lindex $args 0] [lindex $args 1] == [lindex $args 2]" - set output_file "[file rootname [file tail $prog]].exe" - set cmd_file "[file rootname [file tail $prog]].gdb" - - set fd [open $cmd_file "w"] set line [lindex $args 0] if { [string range $line 0 0] == "@" } { set line [string range $line 1 end] } else { set line [get-absolute-line $useline $line] } + + set gdb_name $::env(GUALITY_GDB_NAME) + set testname "$testcase line $line [lindex $args 1] == [lindex $args 2]" + set output_file "[file rootname [file tail $prog]].exe" + set cmd_file "[file rootname [file tail $prog]].gdb" + + set fd [open $cmd_file "w"] puts $fd "break $line" puts $fd "run" puts $fd "$command $var"