diff options
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi1-var-block.exp')
-rw-r--r-- | gdb/testsuite/gdb.mi/mi1-var-block.exp | 71 |
1 files changed, 8 insertions, 63 deletions
diff --git a/gdb/testsuite/gdb.mi/mi1-var-block.exp b/gdb/testsuite/gdb.mi/mi1-var-block.exp index 1478280334b..0ff9356ccf2 100644 --- a/gdb/testsuite/gdb.mi/mi1-var-block.exp +++ b/gdb/testsuite/gdb.mi/mi1-var-block.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. # # This Program Is Free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -42,19 +42,7 @@ mi_delete_breakpoints mi_gdb_reinitialize_dir $srcdir/$subdir mi_gdb_load ${binfile} -mi_gdb_test "200-break-insert do_block_tests" \ - "200\\^done,bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"do_block_tests\",file=\".*var-cmd.c\",line=\"154\",times=\"0\"\}" \ - "break-insert operation" - -mi_run_cmd -# The running part has been checked already by mi_run_cmd -gdb_expect { - -re "\[\r\n\]*000\\*stopped,reason=\"breakpoint-hit\",bkptno=\"1\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"154\"\}\r\n$mi_gdb_prompt$" { - pass "run to do_block_tests" - } - -re ".*$mi_gdb_prompt$" {fail "run to do_block_tests (2)"} - timeout {fail "run to do_block_tests (timeout 2)"} -} +mi_runto do_block_tests # Test: c_variable-3.2 # Desc: create cb and foo @@ -67,15 +55,7 @@ mi_gdb_test "-var-create foo * foo" \ "create local variable foo" # step to "foo = 123;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"158\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { - fail "step at do_block_tests (timeout)" - } -} +mi_step_to "do_block_tests" "" "var-cmd.c" "158" "step at do_block_test" # Be paranoid and assume 3.2 created foo @@ -91,15 +71,7 @@ mi_gdb_test "-var-create foo * foo" \ "create local variable foo" # step to "foo2 = 123;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"161\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { - fail "step at do_block_tests (timeout)" - } -} +mi_step_to "do_block_tests" "" "var-cmd.c" "161" "step at do_block_test" # Test: c_variable-3.4 # Desc: check foo, cb changed @@ -108,15 +80,7 @@ mi_gdb_test "-var-update *" \ "update all vars: cb foo changed" # step to "foo = 321;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"164\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { - fail "step at do_block_tests (timeout)" - } -} +mi_step_to "do_block_tests" "" "var-cmd.c" "164" "step at do_block_test" # Test: c_variable-3.5 # Desc: create inner block foo @@ -125,13 +89,7 @@ mi_gdb_test "-var-create inner_foo * foo" \ "create local variable inner_foo" # step to "foo2 = 0;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"166\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { fail "step at do_block_tests (timeout)" } -} +mi_step_to "do_block_tests" "" "var-cmd.c" "166" "step at do_block_test" # Test: c_variable-3.6 # Desc: create foo2 @@ -163,13 +121,7 @@ mi_gdb_test "-var-delete inner_foo" \ "delete var inner_foo" # step to "foo = 0;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"168\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { fail "step at do_block_tests (timeout)" } -} +mi_step_to "do_block_tests" "" "var-cmd.c" "168" "step at do_block_test" # Test: c_variable-3.8 # Desc: check that foo2 out of scope (known gdb problem) @@ -180,14 +132,7 @@ mi_gdb_test "-var-update foo2" \ clear_xfail *-*-* # step to "cb = 21;" -send_gdb "-exec-step\n" -gdb_expect { - -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"end-stepping-range\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"do_block_tests\",args=\\\[\\\],file=\".*var-cmd.c\",line=\"171\"\}\r\n$mi_gdb_prompt$" { - pass "step at do_block_tests" - } - timeout { fail "step at do_block_tests (timeout)" } -} - +mi_step_to "do_block_tests" "" "var-cmd.c" "171" "step at do_block_test" # Test: c_variable-3.9 # Desc: check that only cb is in scope (known gdb problem) |