emacs下调试的问题
我在 emacs 下调试 c++ 时遇到问题。当我启动调试命令时:
Mxgdb --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/
I'm running into problems debugging c++ under emacs. When I start the debugging command:
M-xgdb --annotate=3 myprogram
The gdb shell does not prompt. Instead it stuck after showing (gdb) Current directory is ~/programs/small/
as pasted below. I can't type any debug command then... However the status bar shows no error messages. Does any body know how to fix it? Thank you!
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/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我曾经遇到过这样的问题,是由于绑定
.inputrc
中的一些键引起的。如果您不确定是否以这种方式绑定了键,那么您可能没有,但为了测试它,您可以运行 emacs as并查看是否可以修复它。
也许更有可能的是您正在使用 Emacs 的新 mi 界面。在 Emacs 24(尚未发布,但在快照中可用)中,这是默认设置,
gdb --annotate=3
不再是“正确的事情。"对于新界面,您需要gdb -i mi
。I had a problem like this once caused by binding some keys in
.inputrc
. If you're not sure whether you have bound keys in this way you probably haven't, but to test it you can run emacs asand see if that fixes it.
Perhaps more likely is that you are using the new mi interface to Emacs. In Emacs 24 (not yet released, but available in snapshots) this is the default and
gdb --annotate=3
is no longer "the right thing." For the new interface you wantgdb -i mi
.