]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Include group-id in thread-created notification.
authorVladimir Prus <vladimir@codesourcery.com>
Mon, 17 Nov 2008 12:34:19 +0000 (12:34 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Mon, 17 Nov 2008 12:34:19 +0000 (12:34 +0000)
        * mi/mi-interp.c (mi_new_thread, mi_thread_exit): Include
        group id in the output.

gdb/ChangeLog
gdb/mi/mi-interp.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-nonstop.exp
gdb/testsuite/lib/mi-support.exp

index a224e303e204be907b14582c6da8a265b3e91520..b32b96ceeea5dc027bdf33b0505d92e9f5b0a606 100644 (file)
@@ -1,3 +1,10 @@
+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.
index 31216040b043074362ff6d91a3f4f90e37c0b618..e05b1ad5e2baa4d3926100fd96f0e3e4f3429881 100644 (file)
@@ -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);
 }
 
index 29727bd34ff83f5702c76a1921130fa8758b6cdc..1c66e082afa8a43a1a5daebc370ad94c990ca8cd 100644 (file)
@@ -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"
index 0e6e130a4f670f3dd4ca8b182809590a3560391d..4bf0d44b405c88dd943d2e4b1a1c6557789e1895 100644 (file)
@@ -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 {
index 39a2982ddf0783264c2855b9af923d80b52758d0..39db896306e831008def4e560ea92d589949fb06 100644 (file)
@@ -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"