Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFC] info threads takes an argument
@ 2011-02-11  1:52 Michael Snyder
  2011-02-11  6:09 ` Joel Brobecker
  0 siblings, 1 reply; 15+ messages in thread
From: Michael Snyder @ 2011-02-11  1:52 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 70 bytes --]

Seems like it should be possible to inquire about a specific thread.


[-- Attachment #2: thread.txt --]
[-- Type: text/plain, Size: 810 bytes --]


2011-02-10  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>

	* thread.c (info_threads_command): Process arg as thread id.

Index: thread.c
===================================================================
RCS file: /cvs/src/src/gdb/thread.c,v
retrieving revision 1.131
diff -u -p -u -p -r1.131 thread.c
--- thread.c	19 Jan 2011 17:21:36 -0000	1.131
+++ thread.c	11 Feb 2011 01:47:31 -0000
@@ -965,7 +965,16 @@ No selected thread.  See `help thread'.\
 static void
 info_threads_command (char *arg, int from_tty)
 {
-  print_thread_info (uiout, -1, -1);
+  int tid = -1;
+
+  if (arg != NULL && *arg != '\0')
+    {
+      int tmp_tid = strtoul (arg, NULL, 0);
+      if (tmp_tid != 0)
+	tid = tmp_tid;
+    }
+
+  print_thread_info (uiout, tid, -1);
 }
 
 /* Switch from one thread to another.  */

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-02-21 18:43 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-11  1:52 [RFC] info threads takes an argument Michael Snyder
2011-02-11  6:09 ` Joel Brobecker
2011-02-11 19:23   ` Michael Snyder
2011-02-11 21:14     ` Tom Tromey
     [not found]       ` <4D55B1ED.5020808@vmware.com>
     [not found]         ` <m3k4h2e6xu.fsf@fleche.redhat.com>
2011-02-14 20:03           ` Michael Snyder
2011-02-14 20:40             ` Eli Zaretskii
2011-02-15 19:58             ` Tom Tromey
2011-02-15 21:44               ` Michael Snyder
2011-02-16 11:58                 ` Pedro Alves
2011-02-16 18:47                   ` Michael Snyder
2011-02-17 16:57                     ` Jan Kratochvil
2011-02-17 19:12                       ` Michael Snyder
2011-02-17 20:11                       ` Michael Snyder
2011-02-17 21:22                         ` Jan Kratochvil
2011-02-21 18:45                 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox