diff options
author | Jim Ingham <jingham@apple.com> | 2004-05-05 21:18:11 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2004-05-05 21:18:11 +0000 |
commit | ace6eba0c9d88baa52d91ced90e6c62313105bcc (patch) | |
tree | c5d687f0385b57faae8e4db9523c26642ce2e956 /gdb/testsuite/gdb.base/pending.exp | |
parent | 3b4405ad1abb3b7bd0bddec5aa7a889f0423102f (diff) | |
download | gdb-ace6eba0c9d88baa52d91ced90e6c62313105bcc.tar.gz |
Preserve the ignore count when we resolve a pending breakpoint. Also add
a test for this to pending.exp.
Diffstat (limited to 'gdb/testsuite/gdb.base/pending.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/pending.exp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/pending.exp b/gdb/testsuite/gdb.base/pending.exp index 315e544ee74..9bc08020e89 100644 --- a/gdb/testsuite/gdb.base/pending.exp +++ b/gdb/testsuite/gdb.base/pending.exp @@ -207,6 +207,31 @@ gdb_test "info break" \ \[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:26 if x > 3.*" \ "multiple pending breakpoints" + +# +# Try a pending break for a line in a source file with ignore count: +# + +gdb_test_multiple "break pendshr.c:27" "Set pending breakpoint 3" { + -re ".*Make breakpoint pending.*y or \\\[n\\\]. $" { + gdb_test "y" "Breakpoint.*pendshr.c:27.*pending." \ + "Set pending breakpoint 3" + } +} + +gdb_test {ignore $bpnum 2} "Will ignore next 2 crossings of breakpoint .*" \ + "set ignore count on pending breakpoint 3" + +gdb_test "info break" \ + "Num Type\[ \]+Disp Enb Address\[ \]+What.* +\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.* +\[\t \]+stop only if k == 1.* +\[\t \]+print k.* +\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.* +\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:26 if x > 3.* +\[0-9\]+\[\t \]+breakpoint keep y.*PENDING.*pendshr.c:27.*ignore next 2 hits.*" \ +"multiple pending breakpoints 2" + # # Run to main which should resolve a pending breakpoint # @@ -239,6 +264,19 @@ gdb_test "continue" \ \[$\]1 = 1." \ "continue to resolved breakpoint 1" +# +# Disable the other two breakpoints, and continue to the one with +# the ignore count. Make sure you hit it the third time, x should +# be 3 then. +# + +gdb_test "disable 7" "" "Disable other breakpoints" +gdb_test "disable 5" "" "Disable other breakpoints" + +gdb_test "continue" \ + {.*Breakpoint.*pendfunc1.*\(x=3\) at.*pendshr.c:27.*printf.*;} \ +"continue to resolved breakpoint 3" + delete_breakpoints gdb_breakpoint "main" @@ -259,6 +297,7 @@ gdb_test_multiple "break imaginary" "set imaginary pending breakpoint" { # rerun_to_main + gdb_test "info break" \ "Num Type\[ \]+Disp Enb Address\[ \]+What.* \[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline.* |