aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/infrun.c17
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/lib/mi-support.exp6
4 files changed, 27 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3e89893..5fed053 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
+ * infrun.c (normal_stop): For MI, report which threads
+ were stopped.
+
+2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
+
Report thread state in -thread-info output.
* thread.c (print_thread_info): Add new field "state".
diff --git a/gdb/infrun.c b/gdb/infrun.c
index d99a40e..5473c99 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -3879,8 +3879,21 @@ Further execution is probably impossible.\n"));
}
if (ui_out_is_mi_like_p (uiout))
- ui_out_field_int (uiout, "thread-id",
- pid_to_thread_id (inferior_ptid));
+ {
+
+ ui_out_field_int (uiout, "thread-id",
+ pid_to_thread_id (inferior_ptid));
+ if (non_stop)
+ {
+ struct cleanup *back_to = make_cleanup_ui_out_list_begin_end
+ (uiout, "stopped-threads");
+ ui_out_field_int (uiout, NULL,
+ pid_to_thread_id (inferior_ptid));
+ do_cleanups (back_to);
+ }
+ else
+ ui_out_field_string (uiout, "stopped-threads", "all");
+ }
/* The behavior of this routine with respect to the source
flag is:
SRC_LINE: Print only source line
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 1f08b33..d5989a7 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-12 Vladimir Prus <vladimir@codesourcery.com>
+
+ * lib/mi-support.exp (mi_expect_stop): Adjust for the new field.
+
2008-07-11 Kevin Buettner <kevinb@redhat.com>
* gdb.arch/e500-regs.exp (decimal_vector): Adjust "v8_int8" portion
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index e4d9580..d32d373 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -1016,13 +1016,13 @@ proc mi_expect_stop { reason func args file line extra test } {
set a $after_reason
- verbose -log "mi_expect_stop: expecting: \\*stopped,${r}${a}${bn}thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\".*$file\",fullname=\"${fullname_syntax}$file\",line=\"$line\"\}$after_stopped\r\n$prompt_re$"
+ verbose -log "mi_expect_stop: expecting: \\*stopped,${r}${a}${bn}thread-id=\"$decimal\",stopped-threads=.*,frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\".*$file\",fullname=\"${fullname_syntax}$file\",line=\"$line\"\}$after_stopped\r\n$prompt_re$"
gdb_expect {
- -re "\\*stopped,${r}${a}${bn}thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\".*$file\",fullname=\"${fullname_syntax}$file\",line=\"($line)\"\}$after_stopped\r\n$prompt_re$" {
+ -re "\\*stopped,${r}${a}${bn}thread-id=\"$decimal\",stopped-threads=.*,frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\".*$file\",fullname=\"${fullname_syntax}$file\",line=\"($line)\"\}$after_stopped\r\n$prompt_re$" {
pass "$test"
return $expect_out(2,string)
}
- -re "\\*stopped,${r}${a}${bn}thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\".*\",args=\[\\\[\{\].*\[\\\]\}\],file=\".*\",fullname=\"${fullname_syntax}.*\",line=\"\[0-9\]*\"\}.*\r\n$prompt_re$" {
+ -re "\\*stopped,${r}${a}${bn}thread-id=\"$decimal\",stopped-threads=.*,frame=\{addr=\"$hex\",func=\".*\",args=\[\\\[\{\].*\[\\\]\}\],file=\".*\",fullname=\"${fullname_syntax}.*\",line=\"\[0-9\]*\"\}.*\r\n$prompt_re$" {
fail "$test (stopped at wrong place)"
return -1
}