This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Fix thread id quoting
- From: Vladimir Prus <vladimir at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 26 Apr 2008 22:01:45 +0400
- Subject: Fix thread id quoting
I've noticed that FSF HEAD fails to properly quote the thread id
in the =thread-created MI notification. Seems like I've fixed it
later in the non-stop patches, but failed to include that in the
FSF commit.
Fixed thusly.
- Volodya
Index: gdb/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/ChangeLog,v
retrieving revision 1.9318
diff -u -p -r1.9318 ChangeLog
--- gdb/ChangeLog 26 Apr 2008 05:43:45 -0000 1.9318
+++ gdb/ChangeLog 26 Apr 2008 17:55:40 -0000
@@ -1,3 +1,7 @@
+2008-04-26 Vladimir Prus <vladimir@codesourcery.com>
+
+ * mi/mi-interp.c (mi_new_thread): Quote the thread id.
+
2008-04-26 Joel Brobecker <brobecker@adacore.com>
* breakpoint.c (condition_command, commands_from_control_command)
Index: gdb/mi/mi-interp.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-interp.c,v
retrieving revision 1.28
diff -u -p -r1.28 mi-interp.c
--- gdb/mi/mi-interp.c 24 Apr 2008 11:13:44 -0000 1.28
+++ gdb/mi/mi-interp.c 26 Apr 2008 17:55:40 -0000
@@ -313,7 +313,7 @@ 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\"", t->num);
gdb_flush (mi->event_channel);
}