GDB in Emacs 24 messed up

328 views Asked by At

I am using emacs 24.5.1 and GDB 7.10 in conjunction with the GUD integration.

I am starting GUD with the following bash command:

emacs --eval "(gdb \"gdb -i=mi --fullname --cd=`pwd` -args $*\")" &

I have set the following variables

  • '(gdb-show-main t)

With the previous version of emacs (23), I had two windows/buffers:

  1. Output of the program being run AND the GUD prompt (gdb)
  2. The code/source window showing the code and where the debugger is at
+--------------+
| *gud-binary* |
+--------------+
|  source.cpp  |
+--------------+

Whenever I stepped in the *gud-binary* window in emacs 23, the result was shown in the source window below.

What's strange in emacs 24 is that emacs replaces the *gud-binary* buffer with the source buffer whenever I step in gdb. It seems that every buffer is displayed in the first window. So, the second window actually doesn't have any function at all.

How can I fix that?

0

There are 0 answers