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: gud.el organization and adding debuggers Date: Sun, 5 Feb 2006 20:44:47 +1300 Message-ID: <17381.44271.360974.907666@kahikatea.snap.net.nz> References: <17377.22796.880736.93318@panix3.panix.com> 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 1139125570 13149 80.91.229.2 (5 Feb 2006 07:46:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Feb 2006 07:46:10 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 05 08:46:06 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F5eay-0002E6-3f for ged-emacs-devel@m.gmane.org; Sun, 05 Feb 2006 08:46:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F5eeC-0005SE-VI for ged-emacs-devel@m.gmane.org; Sun, 05 Feb 2006 02:49:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F5ee1-0005S8-2N for emacs-devel@gnu.org; Sun, 05 Feb 2006 02:49:13 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F5edz-0005Rw-3J for emacs-devel@gnu.org; Sun, 05 Feb 2006 02:49:12 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F5edy-0005Rt-UA for emacs-devel@gnu.org; Sun, 05 Feb 2006 02:49:11 -0500 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F5edJ-0000GU-EA for emacs-devel@gnu.org; Sun, 05 Feb 2006 02:48:30 -0500 Original-Received: from kahikatea.snap.net.nz (p202-124-114-201.snap.net.nz [202.124.114.201]) by viper.snap.net.nz (Postfix) with ESMTP id C6B54740C2B; Sun, 5 Feb 2006 20:45:37 +1300 (NZDT) Original-Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id F23E9888C; Sun, 5 Feb 2006 20:44:47 +1300 (NZDT) Original-To: rocky@panix.com In-Reply-To: <17377.22796.880736.93318@panix3.panix.com> X-Mailer: VM 7.19 under Emacs 22.0.50.53 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 Xref: news.gmane.org gmane.emacs.devel:50035 Archived-At: ... > In order to get capabilities for the menu items that gud > doesn't think your debugger will have (like "up") and disable features > that gud thinks your debugger *must* have (like "stepi"??), one needs > to do something additional. gud-stepi is only enabled for gdb and dbx. Why do you have to disable it? > So in this scenario to add a new debugger you copy a *file* rather > than a section of this file and *forget* to modify that > gud-menu-map. And along with this, I guess I'm also suggesting that > instead of listing all of the debugger capabilities in the > easy-mmode-defmap gud-menu-map, the capabilities would be added in the > individual debuggers. As always, it might be a bit more complicated than you think. For example, there are currently 2 modes for GDB (3 if you include one distributed with GDB). > Some other miscellaneous remarks. I note that in gud.el CVS more > gud-menu-map items have been added. Excellent! One of them is "run", > but I note that most of the time it is nil. I'm assuming "run" means > the gdb "run" command, which I think would better be called "restart". > > If gud's "run" is supposed to indicate something else, then given it's > not used all that much even in gud, I think you're confused. nil just means there is no keybinding, not that its not used. It just appears on the menu bar and tool bar. > then I'd suggest renaming it to > mean "restart" or adding a "restart" menu item. bashdb for example has > such a command, so does gdb, perldb, mdb, and pydb. In other words, > restarting is a pretty common thing you might want to do. GDB's run command *is* the restart command. You could rename gud-run to gud-restart but I think that would be confusing (GDB is the principal debugger for GUD). What should I add for basdb? The following? (gud-def gud-run "restart" nil "Start/restart the program.") > The other menu items that I've added to my debuggers is > > * something to show a stack trace -- gud-where with key T which is > what perldb, mdb, pydb and bashdb use. Do you mean in a separate buffer? GDB does this now. If you can do this with other debuggers e.g bash that would be good but you need to be careful about updating. > * something to toggle line tracing > > - - - > > "local-set-key [menu-bar debug up]" is used in the various > debuggers. On my GNU Emacs 21.4.1 (GNU/Linux) with X Windows, I am not > aware of any evidence of menu-bar in the display. Where is it? On GNU Emacs 21.4 gud-up should be visible with gdb, dbx, and xdb. If you can't even see the menu bar, what happens if you do menu-bar-mode? Nick http://www.inet.net.nz/~nickrob