This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFC] Include group-id in thread-created notification.


The =thread-created notification better mention the thread-group the new thread
is part of -- otherwise, frontend will have no idea where in the thread tree to
put the new one. The =thread-exited notification, technically, need not have
thread group id, but putting it there costs nothing and frontend authors said
it simplifies things.

Will commit in a few days if there are no objections.

- Volodya


From 39559c29921b1c3df982ff056af0dd23e1264afe Mon Sep 17 00:00:00 2001

	* mi/mi-interp.c (mi_new_thread, mi_thread_exit): Include
	group id in the output.

git-svn-id: svn+ssh://cugel/net/svn-internal/subversion/Repository/csl/gdb/branches/ericsson@217541 e7755896-6108-0410-9592-8049d3e74e28
---
 gdb/mi/mi-interp.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/gdb/mi/mi-interp.c b/gdb/mi/mi-interp.c
index 3121604..e05b1ad 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);
 }
 
-- 
1.5.3.5


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]