Mac OS X上的Emacs 24和GDB 6.3

Gra*_*erg 13 c++ macos emacs gdb osx-lion

过去几天我一直在OS X Lion上试用Emacs 24(预测试24.0.95.1),但是我遇到了新gdb/MI界面的一些问题.

使用Xcode附带的GDB 6.3,但gdb/MI接口似乎根本没有加载.它似乎尝试启动GDB GUD模式,但没有命令实际工作.

我还尝试通过Homebrew安装GDB-7.4.这让我部分在那里.gdb-many-windows界面显示,但gdb提示永远不会到达.Emacs只是坐在那里吃了100%的CPU,但却没有反应迟钝.我仍然可以打开文件等.我只是无法用GDB做任何事情.

有没有其他人遇到过类似的问题?你能解决它们,如果是这样,怎么办?


编辑:2012-06-10:我刚刚尝试了新发布的Emacs 24.1.GDB 6.3(通过Xcode)的行为保持不变.GDB-7.4略差,因为它启动了GDB,而emacs耗尽了1​​00%的CPU,但现在我无法做任何其他事情.Emacs如果被冻结:/

Han*_*Sun 9

我尝试使用Keychain.app的修改认证方式

http://sourceware.org/gdb/wiki/BuildingOnDarwin

它仍然抱怨认证..

GNU gdb (GDB) 7.4
Copyright (C) 2012 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-apple-darwin11.3.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /Users/hanfei/Documents/mis/mis...Reading symbols from /Users/hanfei/Documents/mis/mis.dSYM/Contents/Resources/DWARF/mis...done.
done.
(gdb) r
Starting program: /Users/hanfei/Documents/mis/mis 
Unable to find Mach task port for process-id 52327: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
Run Code Online (Sandbox Code Playgroud)

然后我尝试了:

$ sudo chgrp procmod /yourpath/gdb
$ sudo chmod g+s /yourpath/gdb
Run Code Online (Sandbox Code Playgroud)

的工作原理,现在对我来说.


Kao*_*lix 5

我使用的是Emacs 24.1,我从Savannah git的源代码构建在Mac OSX Lion(10.7.4)上。该构建基于emacs-24.1标记,并已应用了适用于Lion全屏支持的补丁。

Gdb 6.3对我来说很奇怪。它抱怨-i = mi标志,并且在每个命令提示符之前一直打印一个奇怪的时间戳,将其推(gdb)到最右边,确实很难使用。完成效果不佳,并且可能还有其他问题使我无意进一步调查。

在尝试从Emacs运行gdb时,使用homebrew / dupes龙头中的gdb 7.4,得到了Firegun提到的链接http://sourceware.org/gdb/wiki/BuildingOnDarwin中描述的相同错误:

Starting program: /x/y/foo
Unable to find Mach task port for process-id 28885: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
Run Code Online (Sandbox Code Playgroud)

但是,我按照其中描述的每个步骤创建了证书并签署了gdb,现在它可以正常运行了。我使用启动gdb M-x gdb,然后使用file命令加载要调试的应用程序。当我键入内容时run,会提示您输入密码,以允许开发人员工具控制另一个进程。输入密码后,它可以正常运行。它在断点处停止,在代码的边缘带有箭头,如果转到Gud> GDB-MI>显示其他窗口,它将显示其他带有信息的窗口。