diff options
author | Daniel Jacobowitz <drow@false.org> | 2009-11-13 21:59:00 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2009-11-13 21:59:00 +0000 |
commit | 7cbcbded71b7da1f31f63ac3cb5705249e5e4887 (patch) | |
tree | 6b29c6cbb28ebf0caa2b79045a41170249409e94 /gdb/testsuite/gdb.base/display.exp | |
parent | f16cd0d502d32721849ec650d4dfda17fb530066 (diff) | |
download | gdb-7cbcbded71b7da1f31f63ac3cb5705249e5e4887.zip gdb-7cbcbded71b7da1f31f63ac3cb5705249e5e4887.tar.gz gdb-7cbcbded71b7da1f31f63ac3cb5705249e5e4887.tar.bz2 |
gdb/testsuite/
* gdb.cp/formatted-ref.exp (test_p_x_ref_addr): Allow the reference
to be in memory.
* gdb.base/display.c (force_mem): New.
(do_loops): Use it. Add breakpoint comments.
(do_vars): Add a breakpoint comment.
* gdb.base/display.exp: Use gdb_get_line_number. Remove hardcoded
line numbers.
Diffstat (limited to 'gdb/testsuite/gdb.base/display.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/display.exp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp index 174c53f..9839705 100644 --- a/gdb/testsuite/gdb.base/display.exp +++ b/gdb/testsuite/gdb.base/display.exp @@ -78,13 +78,15 @@ if [target_info exists gdb,no_hardware_watchpoints] { gdb_test "set can-use-hw-watchpoints 0" "" "" } -gdb_test "break 14" ".*Breakpoint 2.*" "break do_loops" +set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] +gdb_test "break $bp_location1" ".*Breakpoint 2.*" "break do_loops" gdb_test "cont" ".*Breakpoint 2, do_loops.*" "get to do_loops" # Create stopping points. # gdb_test "watch sum" ".*\[Ww\]atchpoint 3: sum.*" "set watch" -gdb_test "break 19" ".*Breakpoint 4.*" "break 19" +set bp_location2 [gdb_get_line_number "set breakpoint 2 here"] +gdb_test "break $bp_location2" ".*Breakpoint 4.*" "break loop end" # Create displays for those points # @@ -161,9 +163,10 @@ gdb_expect { } } -gdb_test "step" ".*do_vars.*.*27.*" -gdb_test "tbreak 37" ".*breakpoint 5 a.*" -gdb_test "cont" ".*do_vars.*37.*37.*" +gdb_test "step" ".*do_vars.*.*i = 9.*" +set bp_location3 [gdb_get_line_number "set breakpoint 3 here"] +gdb_test "tbreak $bp_location3" ".*breakpoint 5 a.*" "tbreak in do_vars" +gdb_test "cont" ".*do_vars.*$bp_location3.*$bp_location3.*" # Beat on printf a bit # |