I am using emacs 25.1 and gdb 7.12 now. but when I run "M-x gdb -i=mi a.out",then set break point and issue next command, a source code window alway popup to get focus, then if I want to issue next command again, I have to switch to the gdb window firstly, otherwise, keyboard input will be direct to the source code file.
We should keep focus on the gdb window rather than switch focus to the source code window.
Am I wrong to use this gdb mode? BTW,gud-gdb mode works fine.
A couple of things:
1) They (I know, I know ... who's "They"? :-) have mucked with gdb.
2) See #1
I'm generally a solution type of person, but workaround works in this case, for now.
a) Use gud-gdb instead of gdb
b) To keep the gdb command window from being clobbered, use:
set-window-dedicated-p
I use as follows:
(defun pgmdb (pgm)
(gud-gdb (format "gdb -fullname %s" pgm))
(set-window-dedicated-p nil t)
)
That keeps the former functionality somewhat intact.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With