gdb 8.2.1 + macOS Mojave
前提
- macOS Sierra/High Sierra 为了提高系统安全性,对相关权限做出了限制.
- gdb 8.2.1作为最新版本(2019.1.29),与gdb 8.0.1又有不同.从8.0.1更新到8.2.1,导致原先可以运行的gdb无法运行=(
解决方案
常见错误提示:
"During startup program terminated with signal ?, unkown signal."
解决方案
首先由 brew inför gdb获得解决方案信息
==> Caveats
gdb requires special privileges to access Mach ports.
You will need to codesign the binary. For instructions, see:
https://sourceware.org/gdb/wiki/BuildingOnDarwin
On 10.12 (Sierra) or later with SIP, you need to run this:
echo "set startup-with-shell off" >> ~/.gdbinit
ok,依据上面的网页信息进行修改.如果你和我一样没有解决问题,参考这个网页.
这个网页可能出现的问题:
第十步>>>
$killall taskgated
显示
No matching processes belonging to you were found
更改为:
ps aux | grep taskgated find the PID
sudu kill -9 PID
结语
最终的最终,我们Google了大量信息、gdb抛出许多问题,在经历了这么多后,我们发现…问题还没有解决,诶,该怎么说了,引用以为朋友的话: