gdb os x sierra 10.12.3不工作 [英] gdb os x sierra 10.12.3 not working

查看:94
本文介绍了gdb os x sierra 10.12.3不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题已经知道,gdb不再适用于OS X Sierra。

这真的很烦人,因为我已经研究过这个解决方案,并且有一些解决方案,但他们显然不再工作了。我尝试使用.gdbinit文件解决方案和禁用csrutil解决方案,两者都不起作用。



Sooo我的问题是:有谁知道如何在10.12中修复它.3?



非常感谢!

解决方案

感谢Basile Starynkevitch ,只是给了我更新gdb的想法



解决方案:

您只需要为最新版本(目前是7.12.1)更新 gdb。假设你已经安装了Homebrew:



这就是我所做的:

  brew更新
brew删除gdb
brew安装gdb

现在已更新为最新版本。

现在再次使用您以前使用过的证书对gdb进行编码。

  sudo killall taskgated 
codesign -fs gdb-certi / usr / local / bin / gdb
launchctl load /System/Library/LaunchDaemons/com.apple.taskgated.plist

最后一步仍然使用创建.gdbinit文件的解决方法:

  nano〜/ .gdbinit 

- > 设置启动与关闭shell



现在调试对我有用:)( OS X Sierra 10.12.3 - gdb 7.12.1 )。

更新:



显然它会解决某些问题,但不是整个问题本身。它仍然会导致错误。老实说,我的解决方案:当你可以:切换到LLDB和另一个IDE (Netbeans不支持LLDB)。或者使用Linux。我目前在我的MacBook Pro上使用Ubuntu。


the problem is already known, that gdb doesn't work with OS X Sierra anymore.

This is really annoying, since I researched already about the solution, and there were some solutions, but they apparently don't work anymore. I tried to use the .gdbinit file solution and the disable csrutil solution, both doesn't work.

Sooo my question is: Does anyone know how to fix it in 10.12.3 ?

Thank you very much!

解决方案

So thanks to Basile Starynkevitch, who just gave me the idea to update gdb

SOLUTION:

You simply have to update gdb for the latest version (which is 7.12.1 currently). Assuming you have installed Homebrew:

That's what I did:

brew update 
brew remove gdb
brew install gdb

It has now updated to the latest version.

Now codesign gdb again with the cert that you used before.

sudo killall taskgated
codesign -fs gdb-certi /usr/local/bin/gdb 
launchctl load /System/Library/LaunchDaemons/com.apple.taskgated.plist

Last step is still to use the workaround to create the .gdbinit file:

nano ~/.gdbinit 

-> set startup-with-shell off

Debugging works for me now :) (OS X Sierra 10.12.3 - gdb 7.12.1).

UPDATE:

Apparently it will fix certain problems, but not the whole problematic itself. It will still cause errors. Honestly, my solution: When you can: Switch to LLDB and another IDE (Netbeans does not support LLDB). Or use Linux. I currently use Ubuntu with a stick on my MacBook Pro.

这篇关于gdb os x sierra 10.12.3不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆