gud-gdb emacs 24 not working

纵饮孤独 提交于 2019-11-28 08:00:16

问题


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?


回答1:


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




回答2:


Try M-x gdb with -i=mi instead of --annotate=3.

Then it worked for me, but it's damn slow in my case :/




回答3:


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!