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]

enable a couple of useful cli commands in async mode.


This is needed to test/develop async with CLI.  The info info command is
very useful to debug gdb itself, and the interrupt command is needed to be
able to SIGINT the target.  Without it, the user is trapped in the hole
of wanting to quit, but gdb complaining "I can't do that Dave" while  the 
target is running.  "stop" is there already, so I added break too,
although it doesn't work yet.

CLI command filtering this way is a gross hack that needs cleaning
up anyway.  Since noone is using this currently, I went ahead and installed
as obvious.

-- 
Pedro Alves
2008-03-14  Pedro Alves  <pedro@codesourcery.com>

	* top.c (execute_command): Enable break, info and interrupt
	commands in async mode.

---
 gdb/top.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: src/gdb/top.c
===================================================================
--- src.orig/gdb/top.c	2008-03-14 07:01:54.000000000 +0000
+++ src/gdb/top.c	2008-03-14 07:01:57.000000000 +0000
@@ -405,7 +405,10 @@ execute_command (char *p, int from_tty)
 	if (strcmp (c->name, "help") != 0
 	    && strcmp (c->name, "pwd") != 0
 	    && strcmp (c->name, "show") != 0
-	    && strcmp (c->name, "stop") != 0)
+	    && strcmp (c->name, "stop") != 0
+	    && strcmp (c->name, "break") != 0
+	    && strcmp (c->name, "info") != 0
+	    && strcmp (c->name, "interrupt") != 0)
 	  error (_("Cannot execute this command while the target is running."));
 
       /* Pass null arg rather than an empty one.  */

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