3
這源於How to install gdb (debugger) in Mac OSX El Capitan?。如何讓gdb在OSX 10.11下使用macports工作El Capitan?
我有在el capitan下工作的macports沒有問題,並已安裝gdb端口,但我無法使編碼簽名工作。這一切似乎都奏效了。證書在那裏,並且設置了「始終信任」。二進制顯示:
$ codesign -d -v -v /opt/local/bin/ggdb
Executable=/opt/local/bin/ggdb
Identifier=org.gnu.gdb
Format=Mach-O thin (x86_64)
CodeDirectory v=20100 size=25320 flags=0x0(none) hashes=1261+2 location=embedded
Signature size=1392
Authority=gdb-cert
Signed Time=23 Oct 2015, 07:56:53
Info.plist entries=4
TeamIdentifier=not set
Sealed Resources=none
Internal requirements count=1 size=88
,但我得到
(gdb) r
Starting program: /Users/sal/Katiss/ecodriving
Unable to find Mach task port for process-id 39278: (os/kern) failure (0x5).
(please check gdb is codesigned - see taskgated(8))
當我嘗試啓動調試的東西。
任何想法?
謝謝。解決了它。 –
這並不能解決我的問題。你需要重新啓動或重新啓動會話? – chqrlie
有兩種不同的選擇:對於procmod組成員被允許運行自定義的gdb,-p選項必須被添加到'taskgated'。另一種選擇是簽署二進制文件,並將用戶添加到'_developer'組。看到我的總結在http://stackoverflow.com/a/34221969/4402721 – drRobertz