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] 08/10 Enable thread commands


Now that "info threads" and "thread n" work with a running
inferior, we can enable them.

-- 
Pedro Alves
---
 gdb/Makefile.in |    2 +-
 gdb/thread.c    |   11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

Index: src/gdb/Makefile.in
===================================================================
--- src.orig/gdb/Makefile.in	2008-05-06 15:43:57.000000000 +0100
+++ src/gdb/Makefile.in	2008-05-06 15:44:55.000000000 +0100
@@ -2930,7 +2930,7 @@ target-memory.o: target-memory.c $(defs_
 thread.o: thread.c $(defs_h) $(symtab_h) $(frame_h) $(inferior_h) \
 	$(environ_h) $(value_h) $(target_h) $(gdbthread_h) $(exceptions_h) \
 	$(command_h) $(gdbcmd_h) $(regcache_h) $(gdb_h) $(gdb_string_h) \
-	$(ui_out_h) $(observer_h)
+	$(ui_out_h) $(observer_h) $(cli_decode_h)
 top.o: top.c $(defs_h) $(gdbcmd_h) $(call_cmds_h) $(cli_cmds_h) \
 	$(cli_script_h) $(cli_setshow_h) $(cli_decode_h) $(symtab_h) \
 	$(inferior_h) $(exceptions_h) $(target_h) $(breakpoint_h) \
Index: src/gdb/thread.c
===================================================================
--- src.orig/gdb/thread.c	2008-05-06 15:44:40.000000000 +0100
+++ src/gdb/thread.c	2008-05-06 15:44:55.000000000 +0100
@@ -41,6 +41,8 @@
 #include "ui-out.h"
 #include "observer.h"
 
+#include "cli/cli-decode.h"
+
 /* Definition of struct thread_info exported to gdbthread.h */
 
 /* Prototypes for exported functions. */
@@ -965,14 +967,17 @@ void
 _initialize_thread (void)
 {
   static struct cmd_list_element *thread_apply_list = NULL;
+  struct cmd_list_element *c;
 
-  add_info ("threads", info_threads_command,
-	    _("IDs of currently known threads."));
+  c = add_info ("threads", info_threads_command,
+		_("IDs of currently known threads."));
+  set_cmd_async_ok (c);
 
-  add_prefix_cmd ("thread", class_run, thread_command, _("\
+  c = add_prefix_cmd ("thread", class_run, thread_command, _("\
 Use this command to switch between threads.\n\
 The new thread ID must be currently known."),
 		  &thread_cmd_list, "thread ", 1, &cmdlist);
+  set_cmd_async_ok (c);
 
   add_prefix_cmd ("apply", class_run, thread_apply_command,
 		  _("Apply a command to a list of threads."),

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