diff options
Diffstat (limited to 'gdb/testsuite/gdb.cp/breakpoint.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/breakpoint.exp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.cp/breakpoint.exp b/gdb/testsuite/gdb.cp/breakpoint.exp index d75e0f7..57f2fd4 100644 --- a/gdb/testsuite/gdb.cp/breakpoint.exp +++ b/gdb/testsuite/gdb.cp/breakpoint.exp @@ -61,5 +61,15 @@ proc test_breakpoint {name} { test_breakpoint "C1::Nested::foo" +set bp_location1 [gdb_get_line_number "conditional breakpoint in method"] +set bp_location2 [gdb_get_line_number "conditional breakpoint in method 2"] +gdb_test "break $bp_location1 if i_==3" ".*Breakpoint.*" "conditional breakpoint in method" +gdb_test "break $bp_location2 if i_==3" ".*Breakpoint.*" "conditional breakpoint in method 2" +gdb_test "continue" ".*Breakpoint.*C1::foo.*" "continue to breakpoint" +gdb_test "print i_" "\\\$1 = 3" "check the member variable" +gdb_test "continue" ".*Breakpoint.*C1::bar.*" "continue to breakpoint" +gdb_test "print i_" "\\\$2 = 3" "check the member variable" + + gdb_exit return 0 |