Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
212 views
in Technique[技术] by (71.8m points)

gud-gdb emacs 24 not working

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=3with 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

M-x gud-gdb is not for use with annotate=3 but with --fullname (aka --annotate=1, IIRC).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...