From dc7e1a77a4d3fb8c636628af674327ba20c736b6 Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Fri, 14 Nov 2014 16:45:41 +0000 Subject: [PATCH] Drop remaining references to removed source lines in break1.c and ur1.c In some .exp files it was missed to remove the references to eye-catchers like "set breakpoint 9 here" when the non-prototype function header variants they belonged to were deleted. This patch cleans this up. gdb/testsuite/ChangeLog: * gdb.base/condbreak.exp: Drop references to removed non-prototype function header variants in break1.c. * gdb.base/ena-dis-br.exp: Likewise. * gdb.base/hbreak2.exp: Likewise. * gdb.reverse/until-precsave.exp: Drop references to removed non-prototype function header variants in ur1.c. * gdb.reverse/until-reverse.exp: Likewise. --- gdb/testsuite/ChangeLog | 10 +++++++ gdb/testsuite/gdb.base/condbreak.exp | 28 +++++++++----------- gdb/testsuite/gdb.base/ena-dis-br.exp | 26 ++++++++---------- gdb/testsuite/gdb.base/hbreak2.exp | 25 ++++++----------- gdb/testsuite/gdb.reverse/until-precsave.exp | 6 ++--- gdb/testsuite/gdb.reverse/until-reverse.exp | 6 ++--- 6 files changed, 47 insertions(+), 54 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2a027d5c132..2f7e09cdc20 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2014-11-17 Andreas Arnez + + * gdb.base/condbreak.exp: Drop references to removed non-prototype + function header variants in break1.c. + * gdb.base/ena-dis-br.exp: Likewise. + * gdb.base/hbreak2.exp: Likewise. + * gdb.reverse/until-precsave.exp: Drop references to removed + non-prototype function header variants in ur1.c. + * gdb.reverse/until-reverse.exp: Likewise. + 2014-11-17 Petr Machata * lib/dwarf.exp (Dwarf::cu, Dwarf::tu): Emit diff --git a/gdb/testsuite/gdb.base/condbreak.exp b/gdb/testsuite/gdb.base/condbreak.exp index 123428c45f6..0c26b272120 100644 --- a/gdb/testsuite/gdb.base/condbreak.exp +++ b/gdb/testsuite/gdb.base/condbreak.exp @@ -38,13 +38,9 @@ clean_restart ${binfile} set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] set bp_location6 [gdb_get_line_number "set breakpoint 6 here"] set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile2] -set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile2] -set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile2] set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile2] set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile2] -set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile2] set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile2] -set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile2] # # test break at function @@ -113,15 +109,15 @@ if {$hp_aCC_compiler} { gdb_test "info break" \ "Num Type\[ \]+Disp Enb Address\[ \]+What.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location6.* -\[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile2:($bp_location15|$bp_location16).* +\[0-9\]+\[\t \]+breakpoint keep y.* in marker1$marker1_proto at .*$srcfile2:$bp_location15.* \[\t \]+stop only if \\(1==1\\).* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$bp_location1.* \[\t \]+stop only if \\(1==1\\).* -\[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile2:($bp_location8|$bp_location9).* +\[0-9\]+\[\t \]+breakpoint keep y.* in marker2$marker2_proto at .*$srcfile2:$bp_location8.* \[\t \]+stop only if \\(a==43\\).* -\[0-9\]+\[\t \]+breakpoint keep y.* in marker3$marker3_proto at .*$srcfile2:($bp_location17|$bp_location18).* +\[0-9\]+\[\t \]+breakpoint keep y.* in marker3$marker3_proto at .*$srcfile2:$bp_location17.* \[\t \]+stop only if \\(multi_line_if_conditional\\(1,1,1\\)==0\\).* -\[0-9\]+\[\t \]+breakpoint keep y.* in marker4$marker4_proto at .*$srcfile2:($bp_location13|$bp_location14).*" \ +\[0-9\]+\[\t \]+breakpoint keep y.* in marker4$marker4_proto at .*$srcfile2:$bp_location14.*" \ "breakpoint info" @@ -179,10 +175,10 @@ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, main \\(argc=.*, argv=. # # Until the Dwarf2 writer gets fixed, I'm going to XFAIL its behavior. gdb_test_multiple "continue" "run until breakpoint at marker1" { - -re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile2:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, marker1 \\(\\) at .*$srcfile2:$bp_location15.*$bp_location15\[\t \]+.*$gdb_prompt $" { pass "run until breakpoint at marker1" } - -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile2:($bp_location15|$bp_location16).*($bp_location15|$bp_location16)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker1 \\(\\) at .*$srcfile2:$bp_location15.*$bp_location15\[\t \]+.*$gdb_prompt $" { xfail "run until breakpoint at marker1" } } @@ -191,10 +187,10 @@ gdb_test_multiple "continue" "run until breakpoint at marker1" { # Same issues here as above. setup_xfail hppa2.0w-*-* 11512CLLbs gdb_test_multiple "continue" "run until breakpoint at marker2" { - -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile2:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, marker2 \\(a=43\\) at .*$srcfile2:$bp_location8.*$bp_location8\[\t \]+.*$gdb_prompt $" { pass "run until breakpoint at marker2" } - -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile2:($bp_location8|$bp_location9).*($bp_location8|$bp_location9)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker2 \\(a=43\\) at .*$srcfile2:$bp_location8.*$bp_location8\[\t \]+.*$gdb_prompt $" { xfail "run until breakpoint at marker2" } } @@ -228,20 +224,20 @@ gdb_test "break *main if (1==1) ta 999" \ set test "run until breakpoint at marker3" gdb_test_multiple "continue" $test { - -re "Continuing\\..*Breakpoint \[0-9\]+, marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile2:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile2:$bp_location17.*$bp_location17\[\t \]+.*$gdb_prompt $" { pass $test } - -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile2:($bp_location17|$bp_location18).*($bp_location17|$bp_location18)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker3 \\(a=$hex \"stack\", b=$hex \"trace\"\\) at .*$srcfile2:$bp_location17.*$bp_location17\[\t \]+.*$gdb_prompt $" { xfail $test } } set test "run until breakpoint at marker4" gdb_test_multiple "continue" $test { - -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile2:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, marker4 \\(d=177601976\\) at .*$srcfile2:$bp_location14.*$bp_location14\[\t \]+.*$gdb_prompt $" { pass $test } - -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile2:($bp_location13|$bp_location14).*($bp_location13|$bp_location14)\[\t \]+.*$gdb_prompt $" { + -re "Continuing\\..*Breakpoint \[0-9\]+, $hex in marker4 \\(d=177601976\\) at .*$srcfile2:$bp_location14.*$bp_location14\[\t \]+.*$gdb_prompt $" { xfail $test } } diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp index 6f2c469c1a8..4b2f5b97c4b 100644 --- a/gdb/testsuite/gdb.base/ena-dis-br.exp +++ b/gdb/testsuite/gdb.base/ena-dis-br.exp @@ -29,14 +29,10 @@ if {[prepare_for_testing ${testfile}.exp ${testfile} \ set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] set bp_location7 [gdb_get_line_number "set breakpoint 7 here"] set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile2] -set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile2] set bp_location11 [gdb_get_line_number "set breakpoint 11 here"] -set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile2] set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile2] set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile2] -set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile2] set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile2] -set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile2] if ![runto_main] then { fail "enable/disable break tests suppressed" } @@ -58,7 +54,7 @@ proc break_at { breakpoint where } { return $bp } -set bp [break_at "marker1" " line ($bp_location15|$bp_location16)"] +set bp [break_at "marker1" " line $bp_location15"] gdb_test_no_output "enable $bp" "enable break marker1" @@ -82,7 +78,7 @@ gdb_test_no_output "delete $bp" "delete break marker1" # Verify that we can set a breakpoint to be self-disabling after the # first time it triggers. -set bp [break_at "marker2" " line ($bp_location8|$bp_location9)"] +set bp [break_at "marker2" " line $bp_location8"] gdb_test_no_output "enable once $bp" "enable once break marker2" @@ -117,7 +113,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" } -set bp [break_at "marker3" " line ($bp_location17|$bp_location18)"] +set bp [break_at "marker3" " line $bp_location17"] gdb_test_no_output "enable del $bp" "enable del break marker3" @@ -126,7 +122,7 @@ gdb_test "info break $bp" \ "info auto-deleted break marker2" gdb_test "continue" \ - ".*marker3 .*:($bp_location17|$bp_location18).*" \ + ".*marker3 .*:$bp_location17.*" \ "continue to auto-deleted break marker3" gdb_test "info break $bp" \ @@ -136,7 +132,7 @@ gdb_test "info break $bp" \ # Verify that we can set a breakpoint and manually disable it (we've # already proven that disabled bp's don't trigger). -set bp [break_at "marker4" " line ($bp_location14|$bp_location13).*"] +set bp [break_at "marker4" " line $bp_location14.*"] gdb_test_no_output "disable $bp" "disable break marker4" @@ -153,7 +149,7 @@ if ![runto_main] then { set bp [break_at $bp_location7 "line $bp_location7"] -set bp2 [break_at marker1 " line ($bp_location15|$bp_location16)"] +set bp2 [break_at marker1 " line $bp_location15"] gdb_test_no_output "enable count 2 $bp" "disable break with count" @@ -166,7 +162,7 @@ gdb_test "continue" \ "continue from enable count, second time" gdb_test "continue" \ - ".*marker1 .*:($bp_location15|$bp_location16).*" \ + ".*marker1 .*:$bp_location15.*" \ "continue through enable count, now disabled" # Verify that we can set a breakpoint with an ignore count N, which @@ -177,7 +173,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" } -set bp [break_at "marker1" " line ($bp_location15|$bp_location16).*"] +set bp [break_at "marker1" " line $bp_location15.*"] # Verify that an ignore of a non-existent breakpoint is gracefully # handled. @@ -232,7 +228,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" } -set bp [break_at marker1 " line ($bp_location15|$bp_location16).*"] +set bp [break_at marker1 " line $bp_location15.*"] gdb_test "ignore $bp 1" \ "Will ignore next crossing of breakpoint \[0-9\]*.*" \ @@ -248,7 +244,7 @@ gdb_continue_to_end "no stop at ignored & auto-deleted break marker1" rerun_to_main gdb_test "continue" \ - ".*marker1 .*:($bp_location15|$bp_location16).*" \ + ".*marker1 .*:$bp_location15.*" \ "continue to ignored & auto-deleted break marker1" # Verify that a disabled breakpoint's ignore count isn't updated when @@ -258,7 +254,7 @@ if ![runto_main] then { fail "enable/disable break tests suppressed" } -set bp [break_at marker1 " line ($bp_location15|$bp_location16)"] +set bp [break_at marker1 " line $bp_location15"] gdb_test "ignore $bp 10" \ "Will ignore next 10 crossings of breakpoint \[0-9\]*.*" \ diff --git a/gdb/testsuite/gdb.base/hbreak2.exp b/gdb/testsuite/gdb.base/hbreak2.exp index 42049e51d75..7e77eb979ff 100644 --- a/gdb/testsuite/gdb.base/hbreak2.exp +++ b/gdb/testsuite/gdb.base/hbreak2.exp @@ -96,7 +96,7 @@ set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] # board. So, to be sure, we do a list command. # gdb_test "list main" \ - ".*main \\(argc, argv, envp\\).*" \ + ".*main \\(int argc, char ..argv, char ..envp\\).*" \ "use `list' to establish default source file" gdb_test "hbreak $bp_location1" \ "Hardware assisted breakpoint.*at.* file .*$srcfile, line $bp_location1\\." \ @@ -141,7 +141,6 @@ if {$hp_aCC_compiler} { set bp_location7 [gdb_get_line_number "set breakpoint 7 here"] set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1] -set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1] gdb_test "info break" \ "Num Type\[ \]+Disp Enb Address\[ \]+What.* @@ -192,7 +191,7 @@ gdb_test "hbreak \"marker2\"" \ "Hardware assisted breakpoint.*at.* file .*$srcfile1, line.*" \ "hardware breakpoint quoted function (2)" gdb_test "continue" \ - "Continuing\\..*Breakpoint \[0-9\]+, (0x\[0-9a-f\]+ in )?marker2 \\(a=43\\) at .*$srcfile1:($bp_location8|$bp_location9).*" \ + "Continuing\\..*Breakpoint \[0-9\]+, (0x\[0-9a-f\]+ in )?marker2 \\(a=43\\) at .*$srcfile1:$bp_location8.*" \ "run until quoted breakpoint" delete_breakpoints # @@ -394,7 +393,7 @@ gdb_test "hbreak \$foo" \ # Verify that we can set and trigger a breakpoint in a user-called function. # gdb_test "hbreak marker2" \ - "Hardware assisted breakpoint (\[0-9\]*) at .*, line ($bp_location8|$bp_location9).*" \ + "Hardware assisted breakpoint (\[0-9\]*) at .*, line $bp_location8.*" \ "set hardware breakpoint on to-be-called function" gdb_test "print marker2(99)" \ @@ -408,10 +407,10 @@ gdb_test "print marker2(99)" \ # for hppa*-*-hpux. # gdb_test_multiple "bt" "backtrace while in called function" { - -re "#0\[ \t\]*($hex in )?marker2.*:($bp_location8|$bp_location9)\r\n#1.*_sr4export.*$gdb_prompt $" { + -re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*_sr4export.*$gdb_prompt $" { pass "backtrace while in called function" } - -re "#0\[ \t\]*($hex in )?marker2.*:($bp_location8|$bp_location9)\r\n#1.*function called from gdb.*$gdb_prompt $" { + -re "#0\[ \t\]*($hex in )?marker2.*:$bp_location8\r\n#1.*function called from gdb.*$gdb_prompt $" { pass "backtrace while in called function" } } @@ -421,13 +420,13 @@ gdb_test_multiple "bt" "backtrace while in called function" { # breakpoint inserted by GDB at the program's entry point. # gdb_test_multiple "finish" "finish from called function" { - -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.* in _sr4export.*$gdb_prompt $" { + -re "Run till exit from .*marker2.* at .*$bp_location8\r\n.* in _sr4export.*$gdb_prompt $" { pass "finish from called function" } - -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.*function called from gdb.*$gdb_prompt $" { + -re "Run till exit from .*marker2.* at .*$bp_location8\r\n.*function called from gdb.*$gdb_prompt $" { pass "finish from called function" } - -re "Run till exit from .*marker2.* at .*($bp_location8|$bp_location9)\r\n.*Value returned.*$gdb_prompt $" { + -re "Run till exit from .*marker2.* at .*$bp_location8\r\n.*Value returned.*$gdb_prompt $" { pass "finish from called function" } } @@ -577,19 +576,11 @@ gdb_test "hbreak marker4" \ # has no exactly matching line symbol, and GDB reports the breakpoint # as if it were in the middle of a line rather than at the beginning. -set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1] set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1] gdb_test_multiple "continue" \ "run until hardware breakpoint set at small function, optimized file" { - -re "Breakpoint $decimal, marker4 \\(d=(d@entry=)?177601976\\) at .*$srcfile1:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*" { - pass "run until hardware breakpoint set at small function, optimized file" - } - -re "Breakpoint $decimal, $hex in marker4 \\(d=(d@entry=)?177601976\\) at .*$srcfile1:$bp_location13\[\r\n\]+$bp_location13\[\t \]+void marker4.*" { - pass "run until hardware breakpoint set at small function, optimized file" - } -re "Breakpoint $decimal, marker4 \\(d=(d@entry=)?177601976\\) at .*$srcfile1:$bp_location14\[\r\n\]+$bp_location14\[\t \]+void marker4.*" { - # marker4() is defined at line 46 when compiled with -DPROTOTYPES pass "run until hardware breakpoint set at small function, optimized file (line bp_location14)" } -re "Breakpoint $decimal, factorial \\(.*\\) .*\{\r\n$gdb_prompt" { diff --git a/gdb/testsuite/gdb.reverse/until-precsave.exp b/gdb/testsuite/gdb.reverse/until-precsave.exp index db643fa6306..b8a74aeb255 100644 --- a/gdb/testsuite/gdb.reverse/until-precsave.exp +++ b/gdb/testsuite/gdb.reverse/until-precsave.exp @@ -31,7 +31,7 @@ if { [prepare_for_testing $testfile.exp $testfile \ set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] set bp_location7 [gdb_get_line_number "set breakpoint 7 here"] -set bp_location9 [gdb_get_line_number "set breakpoint 9 here" "$srcfile2"] +set bp_location8 [gdb_get_line_number "set breakpoint 8 here" "$srcfile2"] set bp_location19 [gdb_get_line_number "set breakpoint 19 here"] set bp_location20 [gdb_get_line_number "set breakpoint 20 here"] set bp_location21 [gdb_get_line_number "set breakpoint 21 here"] @@ -102,7 +102,7 @@ gdb_test "finish" \ # Advance to a function called by main (marker2) # gdb_test "advance marker2" \ - "marker2 .a=43.*$srcfile2:$bp_location9.*" \ + "marker2 .a=43.*$srcfile2:$bp_location8.*" \ "advance to marker2" # Now issue an until with another function, not called by the current @@ -133,7 +133,7 @@ gdb_test_no_output "set exec-dir reverse" "set reverse execution" # gdb_test "advance marker2" \ - "marker2 .a=43.*$srcfile2:$bp_location9.*" \ + "marker2 .a=43.*$srcfile2:$bp_location8.*" \ "reverse-advance to marker2" # Finish out to main scope (backward) diff --git a/gdb/testsuite/gdb.reverse/until-reverse.exp b/gdb/testsuite/gdb.reverse/until-reverse.exp index b6c3e544a12..389d8928a21 100644 --- a/gdb/testsuite/gdb.reverse/until-reverse.exp +++ b/gdb/testsuite/gdb.reverse/until-reverse.exp @@ -29,7 +29,7 @@ if { [prepare_for_testing $testfile.exp $testfile \ set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] set bp_location7 [gdb_get_line_number "set breakpoint 7 here"] -set bp_location9 [gdb_get_line_number "set breakpoint 9 here" "$srcfile2"] +set bp_location8 [gdb_get_line_number "set breakpoint 8 here" "$srcfile2"] set bp_location19 [gdb_get_line_number "set breakpoint 19 here"] set bp_location20 [gdb_get_line_number "set breakpoint 20 here"] set bp_location21 [gdb_get_line_number "set breakpoint 21 here"] @@ -70,7 +70,7 @@ gdb_test "finish" \ # Advance to a function called by main (marker2) # gdb_test "advance marker2" \ - "marker2 .a=43.*$srcfile2:$bp_location9.*" \ + "marker2 .a=43.*$srcfile2:$bp_location8.*" \ "advance to marker2" # Now issue an until with another function, not called by the current @@ -101,7 +101,7 @@ gdb_test_no_output "set exec-dir reverse" "set reverse execution" # gdb_test "advance marker2" \ - "marker2 .a=43.*$srcfile2:$bp_location9.*" \ + "marker2 .a=43.*$srcfile2:$bp_location8.*" \ "reverse-advance to marker2" # Finish out to main scope (backward) -- 2.39.2