I would like the command gdb
on program X
to instead switch to an existing debugging session of X
if it already exists instead of signalling an error "This program is already being debugged" in gud-common-init
.
I believe this is important as it makes the behaviour of gdb
harmonize with the standard behaviour of most other Emacs interactions such as, find-file
, switch-to-buffer
etc, thus creating less confusion to the user.
So far I have modified the line containing
(error "This program is already being debugged"))
to instead do
(message "This program is already being debugged")
to at least prevent the error from arising. However, the function gdb
does some extra initializations that should not be needed that causes some unnecessary delays. Is this a todo item or have I missed some gud/gdb-function that does this already?
Many thanks in advance, Per Nordlöw