emacs下调试的问题

发布于 2024-12-10 15:27:37 字数 912 浏览 1 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

短暂陪伴 2024-12-17 15:27:37

我曾经遇到过这样的问题,是由于绑定 .inputrc 中的一些键引起的。如果您不确定是否以这种方式绑定了键,那么您可能没有,但为了测试它,您可以运行 emacs as

INPUTRC= emacs &

并查看是否可以修复它。

也许更有可能的是您正在使用 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 as

INPUTRC= emacs &

and 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 want gdb -i mi.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文