让gdb能够在emacs 24中运行

4

在针对这个问题苦思冥想后,我意识到emacs 24中的gdb似乎出了问题。

所以我切换到了gud-gdb

但我现在注意到,在gud-gdb中非常方便的断点上的红点似乎不起作用了。

有人能够明确回答如何使用emacs 24进行合理的C代码调试吗?

我在emacs 23中从未遇到任何问题,但24给我带来了各种麻烦...

也许我应该切换回emacs 23,但这似乎有点倒退?

新方法是以某种方式使用gdb-mi吗?

非常有兴趣了解关于emacs 24的最佳实践-在互联网上找不到任何相关的(emacs 24特定)教程。


请忽略来自一个不满的复制粘贴者的恶意评分。 - bph
1个回答

2

我发现在GNU Emacs 24.3.1上,gdb可以直接使用。

如果还不能正常工作,请尝试使用以下命令:

gdb --fullname binary_name

使用自定义选项替代默认选项

gdb -i=mi binary_name

我认为执行 M-x gud-gdb 命令就是这样做的。 - bph
1
你能否尝试从https://github.com/mirrors/emacs/blob/master/lisp/progmodes/gdb-mi.el下载最新版本的gdb-mi.el并尝试加载它? - iNode
--fullname did not work for me. I get:(gdb) Undefined command: "1-gdb-set". Try "help". (gdb) Undefined command: "2-gdb-set". Try "help". (gdb) Undefined command: "3-gdb-set". Try "help". (gdb) Undefined command: "4-gdb-set". Try "help". (gdb) Undefined command: "5-enable-pretty-printing". Try "help". (gdb) Undefined command: "6-file-list-exec-source-files". Try "help". (gdb) Undefined command: "7-file-list-exec-source-file". Try "help". (gdb) Undefined command: "8-gdb-show". Try "help". (gdb) Undefined command: "9-stack-info-frame". Try "help" - David Elson

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接