[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gud.el organization and adding debuggers
From: |
Stefan Monnier |
Subject: |
Re: gud.el organization and adding debuggers |
Date: |
Thu, 02 Feb 2006 00:30:51 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) |
> 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.
Yes, GUD's support for particular debuggers should be made more modular.
It should also be possible to have several GUD sessions using different
debuggers at the same time.
Patches welcome.
I think a good first step would be to kill gud-def.
Instead of gud sub-modes using
(gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.")
in their main function, we could have a top-level (for example)
(define-gud-cmd gud-break "\C-b" "Set breakpoint at current line.")
and then the gud sub-mode would only do something like
(set (make-local-variable 'gud-break-cmd) "break %f:%l")
so the global menu could use
:visible gud-break-cmd
instead of
:visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))
Of course, maybe this is not the best idea. I'm also thinking that some
each gud sub-mode should be defined as a major mode that derives from
gud-mode.
Stefan
gud.el organization and adding debuggers, Nick Roberts, 2006/02/05