Emacs GDB ReRun Behavior

I would like the command gdbin the program Xinstead to switch to an existing debugging session X, if one already exists, instead of signaling the error "This program is already debugging" in gud-common-init.

I believe this is important, as the behavior gdbharmonizes with the standard behavior of most other Emacs interactions, such as find-file, switch-to-bufferetc., thereby creating less confusion for the user.

So far I have modified the line containing

(error "This program is already being debugged"))

instead of this

(message "This program is already being debugged")

to prevent an error from occurring. However, the function gdbperforms some additional initializations that are not required, which causes some unnecessary delays. Is this a todo element or did I miss some gud / gdb function that does this already?

Thanks a lot in advance, Per Nordlöw

+3
source share
1 answer

You can always rename a buffer. Here is how I can run multiple gdb sessions in the same executable. It is not automatic, but efficient work.

, , gdb * gud-pump *, gdb. meta-x - * gud-pump1 *

gdb, GUD, * gud-pump * * gud-pump1 *. ( ) .

0

All Articles