diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2009-03-12 20:08:04 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2009-03-12 20:08:04 +0000 |
commit | 1f31650a613dfe2ba24b6c61b7f6af54267e109d (patch) | |
tree | 51560c0d9408d958f6607a9d838ba37d759aad5b /gdb/testsuite/gdb.mi/mi-cli.exp | |
parent | 4333ada327bfce18df7d41eaff019fe560fda084 (diff) | |
download | gdb-1f31650a613dfe2ba24b6c61b7f6af54267e109d.zip gdb-1f31650a613dfe2ba24b6c61b7f6af54267e109d.tar.gz gdb-1f31650a613dfe2ba24b6c61b7f6af54267e109d.tar.bz2 |
Include token in ^running notification for CLI commands.
* mi/mi-main.c (mi_execute_command): Set current_token here.
(mi_cmd_execute): Do not set current_token here.
Diffstat (limited to 'gdb/testsuite/gdb.mi/mi-cli.exp')
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-cli.exp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp index b469acb..8427edf 100644 --- a/gdb/testsuite/gdb.mi/mi-cli.exp +++ b/gdb/testsuite/gdb.mi/mi-cli.exp @@ -155,8 +155,24 @@ mi_execute_to "exec-continue" "breakpoint-hit" "main" "" ".*basics.c" \ $line_main_hello { "" "disp=\"del\"" } \ "-exec-continue to line $line_main_hello" -mi_execute_to "exec-next" "end-stepping-range" "main" "" ".*basics.c" $line_main_return "" \ - "-exec-next to line $line_main_return" +# Test that the token is output even for CLI commands +# Also test that *stopped includes frame information. +mi_gdb_test "34 next" \ + ".*34\\\^running.*\\*running,thread-id=\"all\"" \ + "34 next: run" + +gdb_expect { + -re "~\[^\r\n\]+\r\n" { + verbose -log "Hi there" + } +} + +# Note that the output does not include stop reason. This is fine. +# The purpose of *stopped notification for CLI command is to make +# sure that frontend knows that inferior is stopped, and knows where. +# Supplementary information is not necessary. +mi_expect_stop "" "main" "" ".*basics.c" $line_main_return "" \ + "34 next: stop" mi_gdb_test "-interpreter-exec console \"list\"" \ "\~\"$line_main_return\[\\\\t ]*callme \\(1\\);\\\\n\".*\\^done" \ |