aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2009-02-14 15:24:44 +0000
committerVladimir Prus <vladimir@codesourcery.com>2009-02-14 15:24:44 +0000
commit1d33d6baa4963c315d33807eea8ab33742a90369 (patch)
treed4952c79cf2d6ae732371322331643bc82ba8512 /gdb/testsuite
parentfaafb0471077b19764561b55cec06713cefd0c07 (diff)
downloadgdb-1d33d6baa4963c315d33807eea8ab33742a90369.zip
gdb-1d33d6baa4963c315d33807eea8ab33742a90369.tar.gz
gdb-1d33d6baa4963c315d33807eea8ab33742a90369.tar.bz2
Include frame information for *stopped due to CLI commands.
* ada-tasks.c (ada_normal_stop_observer): Adjust prototype. * infcmd.c (finish_command_continuation): Pass '1' for 'print_frame' parameter to the observer. * infrun.c (normal_stop): Don't print mi-specific information here. Pass 'stop_print_frame' to the 'print_frame' parameter of the observer. * mi/mi-interp.c (mi_on_normal_stop): Adjust prototype. If we need to print frame, and current uiout is not the MI one, print frame again.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog7
-rw-r--r--gdb/testsuite/gdb.mi/mi-cli.exp3
-rw-r--r--gdb/testsuite/lib/mi-support.exp10
3 files changed, 15 insertions, 5 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5b5ca26..e760e8a 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2009-02-14 Vladimir Prus <vladimir@codesourcery.com>
+
+ * lib/mi-support.exp (mi_expect_stop): Adjust the order of fields.
+ (mi_expect_interrupt): Likewise.
+ * gdb.mi/mi-cli.exp: Check that "step" results in proper *stopped
+ response.
+
2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
* lib/gdb.exp (get_hexadecimal_valueof): New procedure.
diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp
index b77a4d4..b469acb 100644
--- a/gdb/testsuite/gdb.mi/mi-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi-cli.exp
@@ -140,6 +140,9 @@ mi_gdb_test "500-stack-select-frame 0" \
{500\^done} \
"-stack-select-frame 0"
+mi_execute_to "interpreter-exec console step" "" "callee4" "" ".*basics.c" "29" \
+ "" "check *stopped from CLI command"
+
# NOTE: cagney/2003-02-03: Not yet.
# mi_gdb_test "-break-insert -t basics.c:$line_main_hello" \
# {.*=breakpoint-create,number="3".*\^done} \
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index a85e373..a2aa629 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -1018,13 +1018,13 @@ proc mi_expect_stop { reason func args file line extra test } {
set any "\[^\n\]*"
- verbose -log "mi_expect_stop: expecting: \\*stopped,${r}${a}${bn}thread-id=\"$decimal\",stopped-threads=$any,frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\"$any$file\",fullname=\"${fullname_syntax}$file\",line=\"$line\"\}$after_stopped\r\n($thread_selected_re)?$prompt_re"
+ verbose -log "mi_expect_stop: expecting: \\*stopped,${r}${a}${bn}frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\"$any$file\",fullname=\"${fullname_syntax}$file\",line=\"$line\"\}$after_stopped,thread-id=\"$decimal\",stopped-threads=$any\r\n($thread_selected_re)?$prompt_re"
gdb_expect {
- -re "\\*stopped,${r}${a}${bn}thread-id=\"$decimal\",stopped-threads=$any,frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\"$any$file\",fullname=\"${fullname_syntax}$file\",line=\"($line)\"\}$after_stopped\r\n($thread_selected_re)?$prompt_re" {
+ -re "\\*stopped,${r}${a}${bn}frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\"$any$file\",fullname=\"${fullname_syntax}$file\",line=\"($line)\"\}$after_stopped,thread-id=\"$decimal\",stopped-threads=$any\r\n($thread_selected_re)?$prompt_re" {
pass "$test"
return $expect_out(2,string)
}
- -re "\\*stopped,${r}${a}${bn}thread-id=\"$decimal\",stopped-threads=$any,frame=\{addr=\"$hex\",func=\"$any\",args=\[\\\[\{\]$any\[\\\]\}\],file=\"$any\",fullname=\"${fullname_syntax}$any\",line=\"\[0-9\]*\"\}$any\r\n$prompt_re" {
+ -re "\\*stopped,${r}${a}${bn}frame=\{addr=\"$hex\",func=\"$any\",args=\[\\\[\{\]$any\[\\\]\}\],file=\"$any\",fullname=\"${fullname_syntax}$any\",line=\"\[0-9\]*\"\}thread-id=\"$decimal\",stopped-threads=$any\r\n$prompt_re" {
verbose -log "got $expect_out(buffer)"
fail "$test (stopped at wrong place)"
return -1
@@ -1059,9 +1059,9 @@ proc mi_expect_interrupt { test } {
set any "\[^\n\]*"
# A signal can land anywhere, just ignore the location
- verbose -log "mi_expect_interrupt: expecting: \\*stopped,${r},thread-id=\"$decimal\",stopped-threads=$any\r\n$prompt_re"
+ verbose -log "mi_expect_interrupt: expecting: \\*stopped,${r}$any\r\n$prompt_re"
gdb_expect {
- -re "\\*stopped,${r},thread-id=\"$decimal\",stopped-threads=$any\r\n$prompt_re" {
+ -re "\\*stopped,${r}$any\r\n$prompt_re" {
pass "$test"
return 0;
}