[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gud.el organization and adding debuggers
From: |
Nick Roberts |
Subject: |
gud.el organization and adding debuggers |
Date: |
Sun, 5 Feb 2006 20:44:47 +1300 |
...
> 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
gud.el organization and adding debuggers,
Nick Roberts <=