我遇到了在emacs下调试c ++的问题。当我启动调试命令时:
M-X gdb --annotate=3 myprogram
gdb shell不会提示。相反,它在下面显示粘贴(gdb) Current directory is ~/programs/small/
后卡住了。我无法键入任何调试命令...但状态栏显示没有错误消息。有没有人知道如何解决它?谢谢!
GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/chzhang/programs/small/loop...done.
(gdb) Current directory is ~/programs/small/
答案 0 :(得分:1)
我曾因.inputrc
中的某些键绑定而导致这样的问题。如果你不确定你是否以这种方式绑定了键,你可能没有,但为了测试它你可以运行emacs
INPUTRC= emacs &
并查看是否可以修复它。
也许更有可能的是你正在使用新的mi界面到Emacs。在Emacs 24中(尚未发布,但在快照中可用),这是默认值,gdb --annotate=3
不再是“the right thing”。对于您想要的新界面gdb -i mi
。