+2014-11-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ * 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 <pmachata@redhat.com>
* lib/dwarf.exp (Dwarf::cu, Dwarf::tu): Emit
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
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"
#
# 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"
}
}
# 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"
}
}
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
}
}
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" }
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"
# 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"
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"
"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" \
# 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"
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"
"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
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.
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\]*.*" \
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
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\]*.*" \
# 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\\." \
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.*
"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
#
# 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)" \
# 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"
}
}
# 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"
}
}
# 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" {
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"]
# 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
#
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)
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"]
# 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
#
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)