From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: RFC: a minor mode that uses GDB like CLI commands Date: Mon, 21 Mar 2005 14:55:40 +1200 Message-ID: <16958.14253.9851.210394@farnswood.snap.net.nz> References: <200503181858.j2IIwvAH010170@scanner2.ics.uci.edu> <87sm2rol04.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1111370353 8903 80.91.229.2 (21 Mar 2005 01:59:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 Mar 2005 01:59:13 +0000 (UTC) Cc: Dan Nicolaescu , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 21 02:59:13 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DDCCA-0006s0-RD for ged-emacs-devel@m.gmane.org; Mon, 21 Mar 2005 02:59:08 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DDCTB-0005cj-08 for ged-emacs-devel@m.gmane.org; Sun, 20 Mar 2005 21:16:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DDCSs-0005bX-7L for emacs-devel@gnu.org; Sun, 20 Mar 2005 21:16:22 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DDCSn-0005ZJ-IW for emacs-devel@gnu.org; Sun, 20 Mar 2005 21:16:18 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DDCSn-0005Z2-GQ for emacs-devel@gnu.org; Sun, 20 Mar 2005 21:16:17 -0500 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DDC9s-0004Ml-5p for emacs-devel@gnu.org; Sun, 20 Mar 2005 20:56:44 -0500 Original-Received: from farnswood.snap.net.nz (p236-tnt1.snap.net.nz [202.124.110.236]) by viper.snap.net.nz (Postfix) with ESMTP id 3D71E499A3D; Mon, 21 Mar 2005 13:56:42 +1200 (NZST) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 501) id A0A5061B17; Mon, 21 Mar 2005 02:55:41 +0000 (GMT) Original-To: Juri Linkov In-Reply-To: <87sm2rol04.fsf@jurta.org> X-Mailer: VM 7.19 under Emacs 22.0.50.11 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34873 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34873 > It would be very good to make this mode to work like edebug > (automatically making the source code buffer read-only, etc.) > and to have similar keybindings: > > " " - step > "n" - next > "c" - cont > "g" - go > ... Its seems more natural to use the existing abbreviations for GDB, as Dan suggested: "s" - step "n" - next "c" - cont "r" - run "b" - break ... although there is clearly a significant overlap, in any case. I think the idea of making the debugger source based is a good one and has been tried with gdbsrc.el in XEmacs. The difficulty lies in ensuring that any such mode does not interfere with the normal editing process. As it is proposed, the user would need to keep track of buffers where it was turned on and those where it was turned off. That is why I suggested to Dan that it might be better to toggle all the buffers at once. This is not easy with the present version of gdb-ui, but can be done using the features of GDB 6.2 that I described in relation to turning on gud-minor-mode for existing buffers. It is then possible to define a variable gdb-source-file-list which contains all the source files for the current executable. This list could also be used to toggle gdb-src-cmd-minor-mode. Nick