osx10.11 怎么安装 gdb

2020-09-07 教育 78阅读

LiteIDE调试Go语言需要安装GDB


1.先解决brew不能使用的问题

cd /usr/local/Library
git pull origin master
brew update
brew prune
brew doctor


参考:http://vancelucas.com/blog/fixing-homebrew-on-osx-yosemite-10-10/


2.用Homebrew 安装 gdb

(1)
# brew tap homebrew/dupes
(2)
# brew install gdb

(3)有可能提示:

Warning: No developer tools installed.
You should install the Command Line Tools.
Run `xcode-select --install` to install them.
那就先安装the Command Line Tools.

# xcode-select --install


3.给gdb制作证书并授权:http://plotcup.com/a/129

如果没有证书,会出现如下提示:

(gdb) run
Starting program: /Users/wenke/go/src/gdb/main
Unable to find Mach task port for process-id 18420: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))

声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com