diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5866051977d..e49220e08aa 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2016-04-22 Yao Qi + + * gdb.base/annota1.exp: Set breakpoint on line $main_line. + * gdb.base/annota3.exp: Likewise. + 2016-04-22 Yao Qi * gdb.reverse/step-precsave.exp: Do one step and test program diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp index 36de63638af..38b594c42dd 100644 --- a/gdb/testsuite/gdb.base/annota1.exp +++ b/gdb/testsuite/gdb.base/annota1.exp @@ -46,12 +46,12 @@ clean_restart ${binfile} gdb_test_no_output "set height 0" # -# break at main +# break in main # set main_line [gdb_get_line_number "break main"] -gdb_test "break main" \ +gdb_test "break ${srcfile}:${main_line}" \ "Breakpoint.*at.* file .*$srcfile, line $main_line\\." \ "breakpoint main" @@ -293,16 +293,17 @@ gdb_test_multiple "delete 3" "delete bp 3" { } # -# break at main, after value is initialized. This is in preparation +# break in main, after value is initialized. This is in preparation # to test the annotate output for the display command. # -gdb_test_multiple "break main" "break at main" { +set test "break in main" +gdb_test_multiple "break ${srcfile}:${main_line}" $test { -re "post-prompt.*Breakpoint 4 at $hex: file ${escapedsrcfile}, line $main_line.*\032\032breakpoints-invalid.*$gdb_prompt$" { - pass "break at main" + pass $test } -re "post-prompt.*Breakpoint 4 at $hex: file .*${srcfile}, line $main_line.*\032\032breakpoints-invalid.*$gdb_prompt$" { setup_xfail "*-*-*" 1270 - fail "break at main" + fail $test } } diff --git a/gdb/testsuite/gdb.base/annota3.exp b/gdb/testsuite/gdb.base/annota3.exp index ae70414cb13..de11c4a22fb 100644 --- a/gdb/testsuite/gdb.base/annota3.exp +++ b/gdb/testsuite/gdb.base/annota3.exp @@ -45,12 +45,12 @@ clean_restart ${binfile} gdb_test_no_output "set height 0" # -# break at main +# break in main # set main_line [gdb_get_line_number "break main"] -gdb_test "break main" \ +gdb_test "break ${srcfile}:${main_line}" \ "Breakpoint.*at.* file .*$srcfile, line $main_line\\." \ "breakpoint main" @@ -258,11 +258,11 @@ gdb_expect_list "delete bp 3" "$gdb_prompt$" { } # -# break at main, after value is initialized. This is in preparation +# break in main, after value is initialized. This is in preparation # to test the annotate output for the display command. # -send_gdb "break main\n" -gdb_expect_list "break at main" "$gdb_prompt$" [concat { +send_gdb "break ${srcfile}:${main_line}\n" +gdb_expect_list "break in main" "$gdb_prompt$" [concat { "\r\n\032\032post-prompt\r\n" } [list \ "Breakpoint 4 at 0x\[0-9a-z\]+: file .*annota3.c, line $main_line.\r\n"]]