I'm having difficulties with gdb under emacs 24. I compiled my c code with the -g switch, and the symbol table loads in gdb. The problem I'm having is that no source code is shown when I load my application, no breakpoints are visible. I guess there appears to be no connection between the source code buffer and gdb buffer.
I have used gdb under emacs before (emacs 22, and 23) and it worked well and now it doesn't.
I also tried it under emacs -q
so no plugins are loaded in case my .emacs was at fault, no joy.
Just to recap (so I don't get "compile with -g" answers):
- I compiled with -g I loaded emacs with no plugins
- I used
annotate=3
with gud-gdb - I even tried gdb-mi (doesn't work at all, didn't pursue this road any further)
Gdb ain't working with source code showing (with breakpoints). What can I do to fix it, or at least how can I find out what's wrong?
M-x gud-gdb
is not for use with annotate=3 but with --fullname (aka --annotate=1, IIRC).
Try M-x gdb
with -i=mi
instead of --annotate=3
.
Then it worked for me, but it's damn slow in my case :/
When did you build Emacs 24? There's been a lot of churn in the gdb/gud area from emacs-devel. If you repro problems in the latest (i.e. today's) build, report bugs ASAP. The pretest is coming to an end very soon.
来源:https://stackoverflow.com/questions/9676135/gud-gdb-emacs-24-not-working