summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi/mi-cli.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-cli.exp')
-rw-r--r--gdb/testsuite/gdb.mi/mi-cli.exp119
1 files changed, 92 insertions, 27 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
index 850d177cb19..11773b3ee80 100644
--- a/gdb/testsuite/gdb.mi/mi-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
@@ -57,8 +57,12 @@ mi_gdb_test "-interpreter-exec console bogus" \
"&\\\"$msg\\\\n\\\".*\\^error,msg=\\\"$msg\\\".*" \
"-interpreter-exec console bogus"
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
+# {(=.*)+\^done} \
+# "-interpreter-exec console \"file \$binfile\""
mi_gdb_test "-interpreter-exec console \"file $binfile\"" \
- {(=.*)+\^done} \
+ {\^done} \
"-interpreter-exec console \"file \$binfile\""
mi_run_to_main
@@ -71,8 +75,12 @@ mi_gdb_test "-interpreter-exec console \"show args\"" \
{\~"Argument list to give program being debugged when it is started is \\\"foobar\\\"\.\\n".*\^done} \
"-interpreter-exec console \"show args\""
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"break callee4\"" \
+# {(&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-create,number="2".*\^done} \
+# "-interpreter-exec console \"break callee4\""
mi_gdb_test "-interpreter-exec console \"break callee4\"" \
- {(&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-create,number="2".*\^done} \
+ {(&.*)*.*~"Breakpoint 2 at.*\\n".*\^done} \
"-interpreter-exec console \"break callee4\""
mi_gdb_test "-interpreter-exec console \"info break\"" \
@@ -87,41 +95,94 @@ mi_gdb_test "-interpreter-exec console \"list\"" \
{.*\~"32[ \t(\\t)]*callee1.*\\n".*\^done} \
"-interpreter-exec console \"list\""
-mi_gdb_test "-exec-continue" \
- {.*\*stopped,reason="breakpoint-hit",.*func="callee4".*file=".*basics.c",line="8"\}} \
- "-interpreter-exec console \"continue to callee4\""
+# # NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-exec-continue" \
+# {.*\*stopped,reason="breakpoint-hit",.*func="callee4".*file=".*basics.c",line="8"\}} \
+# "-interpreter-exec console \"continue to callee4\""
+send_gdb "999-exec-continue\n"
+gdb_expect {
+ -re "999\\^running\[\r\n\]+$mi_gdb_prompt.*999\\*stopped,reason=.breakpoint-hit.*$mi_gdb_prompt$" {
+ pass "continue to callee4"
+ }
+ timeout {
+ fail "continue to callee4 (timeout)"
+ }
+}
-mi_gdb_test "-interpreter-exec console \"delete 2\"" \
- {.*=breakpoint-delete,number=\"2\".*\^done} \
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "100-interpreter-exec console \"delete 2\"" \
+# {.*=breakpoint-delete,number=\"2\".*\^done} \
+# "-interpreter-exec console \"delete 2\""
+mi_gdb_test "100-interpreter-exec console \"delete 2\"" \
+ {100\^done} \
"-interpreter-exec console \"delete 2\""
-mi_gdb_test "-interpreter-exec console \"up\"" \
- {.*=selected-frame-level-changed,level="1".*\^done} \
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "200-interpreter-exec console \"up\"" \
+# {.*=selected-frame-level-changed,level="1".*\^done} \
+# "-interpreter-exec console \"up\""
+mi_gdb_test "200-interpreter-exec console \"up\"" \
+ {200\^done} \
"-interpreter-exec console \"up\""
-mi_gdb_test "-interpreter-exec console \"down\"" \
- {.*=selected-frame-level-changed,level="0".*\^done} \
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "300-interpreter-exec console \"down\"" \
+# {.*=selected-frame-level-changed,level="0".*\^done} \
+# "-interpreter-exec console \"down\""
+mi_gdb_test "300-interpreter-exec console \"down\"" \
+ {300\^done} \
"-interpreter-exec console \"down\""
-mi_gdb_test "-interpreter-exec console \"frame 2\"" \
- {.*=selected-frame-level-changed,level="2".*\^done} \
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"frame 2\"" \
+# {.*=selected-frame-level-changed,level="2".*\^done} \
+# "-interpreter-exec console \"frame 2\""
+mi_gdb_test "400-interpreter-exec console \"frame 2\"" \
+ {400\^done} \
"-interpreter-exec console \"frame 2\""
-mi_gdb_test "-stack-select-frame 0" \
- {.*=selected-frame-level-changed,level="0".*\^done} \
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-stack-select-frame 0" \
+# {.*=selected-frame-level-changed,level="0".*\^done} \
+# "-stack-select-frame 0"
+mi_gdb_test "500-stack-select-frame 0" \
+ {500\^done} \
"-stack-select-frame 0"
-mi_gdb_test "-break-insert -t basics.c:35" \
- {.*=breakpoint-create,number="3".*\^done} \
- "-break-insert -t basics.c:35"
-
-mi_gdb_test "-exec-continue" \
- {.*\*stopped.*,file=".*basics.c",line="35"\}} \
- "-exec-continue to line 35"
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-break-insert -t basics.c:35" \
+# {.*=breakpoint-create,number="3".*\^done} \
+# "-break-insert -t basics.c:35"
+mi_gdb_test "600-break-insert -t basics.c:35" \
+ {600\^done,bkpt=.number="3",type="breakpoint".*\}} \
+ "-break-insert -t basics.c:35"
+
+# mi_gdb_test "-exec-continue" \
+# {.*\*stopped.*,file=".*basics.c",line="35"\}} \
+# "-exec-continue to line 35"
+send_gdb "700-exec-continue\n"
+gdb_expect {
+ -re "700\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped.*,file=.*basics.c.,line=.35.*$mi_gdb_prompt$" {
+ pass "-exec-continue to line 35"
+ }
+ timeout {
+ fail "-exec-continue to line 35"
+ }
+}
-mi_gdb_test "-exec-next" \
- {.*\*stopped,reason="end-stepping-range",.*,file=".*basics.c",line="37"\}} \
- "-exec-next to line 37"
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-exec-next" \
+# {.*\*stopped,reason="end-stepping-range",.*,file=".*basics.c",line="37"\}} \
+# "-exec-next to line 37"
+send_gdb "800-exec-next\n"
+gdb_expect {
+ -re "800\\^running\[\r\n\]+$mi_gdb_prompt.*\\*stopped,reason=.end-stepping-range.*,file=.*basics.c.,line=.37.*$mi_gdb_prompt$" {
+ pass "-exec-next to line 37"
+ }
+ timeout {
+ fail "-exec-next to line 37"
+ }
+}
mi_gdb_test "-interpreter-exec console \"list\"" \
{\~"37[ \t(\\t)]*return 0;\\n".*\^done} \
@@ -131,8 +192,12 @@ mi_gdb_test "-interpreter-exec console \"help set args\"" \
{\~"Set argument list to give program being debugged when it is started\.\\nFollow this command with any number of args, to be passed to the program\.".*\^done} \
"-interpreter-exec console \"help set args\""
-mi_gdb_test "-interpreter-exec console \"set \$pc=0x0\"" \
- {.*=target-changed.*\^done} \
+# NOTE: cagney/2003-02-03: Not yet.
+# mi_gdb_test "-interpreter-exec console \"set \$pc=0x0\"" \
+# {.*=target-changed.*\^done} \
+# "-interpreter-exec console \"set \$pc=0x0\""
+mi_gdb_test "888-interpreter-exec console \"set \$pc=0x0\"" \
+ {888\^done} \
"-interpreter-exec console \"set \$pc=0x0\""
#mi_gdb_test "-interpreter-exec console \"\"" \