From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32616 invoked by alias); 14 Mar 2008 08:00:16 -0000 Received: (qmail 32588 invoked by uid 22791); 14 Mar 2008 08:00:11 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 14 Mar 2008 07:59:49 +0000 Received: (qmail 27806 invoked from network); 14 Mar 2008 07:59:47 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Mar 2008 07:59:47 -0000 From: Pedro Alves Subject: enable a couple of useful cli commands in async mode. Date: Fri, 14 Mar 2008 08:00:00 -0000 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) MIME-Version: 1.0 To: gdb-patches@sourceware.org Content-Type: Multipart/Mixed; boundary="Boundary-00=_7Bj2HYfuREjsRPW" Message-Id: <200803140759.55397.pedro@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00159.txt.bz2 --Boundary-00=_7Bj2HYfuREjsRPW Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 565 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 --Boundary-00=_7Bj2HYfuREjsRPW Content-Type: text/x-diff; charset="utf-8"; name="enable_more_async_commands.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="enable_more_async_commands.diff" Content-length: 925 2008-03-14 Pedro Alves * 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. */ --Boundary-00=_7Bj2HYfuREjsRPW--