summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/mi/mi-interp.c8
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.mi/mi-nonstop.exp2
-rw-r--r--gdb/testsuite/lib/mi-support.exp2
5 files changed, 20 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a224e303e2..b32b96ceee 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,12 @@
2008-11-17 Vladimir Prus <vladimir@codesourcery.com>
+ Include group-id in thread-created notification.
+
+ * mi/mi-interp.c (mi_new_thread, mi_thread_exit): Include
+ group id in the output.
+
+2008-11-17 Vladimir Prus <vladimir@codesourcery.com>
+
Notification for attach/detach.
* inferior.c: Call the process observers.
diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 31216040b0..e05b1ad5e2 100644
--- a/gdb/mi/mi-interp.c
+++ b/gdb/mi/mi-interp.c
@@ -293,7 +293,9 @@ mi_new_thread (struct thread_info *t)
{
struct mi_interp *mi = top_level_interpreter_data ();
- fprintf_unfiltered (mi->event_channel, "thread-created,id=\"%d\"", t->num);
+ fprintf_unfiltered (mi->event_channel,
+ "thread-created,id=\"%d\",group-id=\"%d\"",
+ t->num, t->ptid.pid);
gdb_flush (mi->event_channel);
}
@@ -302,7 +304,9 @@ mi_thread_exit (struct thread_info *t)
{
struct mi_interp *mi = top_level_interpreter_data ();
target_terminal_ours ();
- fprintf_unfiltered (mi->event_channel, "thread-exited,id=\"%d\"", t->num);
+ fprintf_unfiltered (mi->event_channel,
+ "thread-exited,id=\"%d\",group-id=\"%d\"",
+ t->num,t->ptid.pid);
gdb_flush (mi->event_channel);
}
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 29727bd34f..1c66e082af 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-11-17 Vladimir Prus <vladimir@codesourcery.com>
+
+ * gdb.mi/mi-nonstop.exp: Expect 'group-id' field.
+ * lib/mi-support.exp: Likewise.
+
2008-11-16 Joel Brobecker <brobecker@adacore.com>
* gdb.base/help.exp: Remove the "catch load" and "catch unload"
diff --git a/gdb/testsuite/gdb.mi/mi-nonstop.exp b/gdb/testsuite/gdb.mi/mi-nonstop.exp
index 0e6e130a4f..4bf0d44b40 100644
--- a/gdb/testsuite/gdb.mi/mi-nonstop.exp
+++ b/gdb/testsuite/gdb.mi/mi-nonstop.exp
@@ -172,7 +172,7 @@ mi_gdb_test "-thread-select 2" "\\^done.*" "select first worker thread"
# Since thread 2 is running, we need to set variable via another thread.
mi_gdb_test "-gdb-set --thread 3 variable exit_first_thread=1" ".*\\^done" "ask the second thread to exit"
gdb_expect {
- -re ".*=thread-exited,id=\"2\"\r\n$" {
+ -re ".*=thread-exited,id=\"2\",group-id=\"\[0-9\]+\"\r\n$" {
pass "wait for thread exit"
}
timeout {
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index 39a2982ddf..39db896306 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -816,7 +816,7 @@ proc mi_run_cmd {args} {
send_gdb "220-exec-run $args\n"
gdb_expect {
- -re "220\\^running\r\n(\\*running,thread-id=\"\[^\"\]+\"\r\n|=thread-created,id=\"1\"\r\n)*${mi_gdb_prompt}" {
+ -re "220\\^running\r\n(\\*running,thread-id=\"\[^\"\]+\"\r\n|=thread-created,id=\"1\",group-id=\"\[0-9\]+\"\r\n)*${mi_gdb_prompt}" {
}
timeout {
perror "Unable to start target"
OpenPOWER on IntegriCloud