• 周六. 2月 24th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

macos下默认的调试工具是lldb

admin

11月 28, 2021

遇到个问题:我在看ostep的14章,做homework,需要使用gdb进行调试,但是macos没有gdb,我想既然如此直接一键三连安装个gdb不就完事了:

HOMEBREW_NO_AUTO_UPDATE=1 brew install gdb

然而直接就报错了:

$ HOMEBREW_NO_AUTO_UPDATE=1 brew install gdb
==> Downloading https://homebrew.bintray.com/bottles/gdb-10.1.big_sur.bottle.tar
#=#=-#  #
curl: (22) The requested URL returned error: 403 Forbidden
Error: Failed to download resource "gdb"
Download failed: https://homebrew.bintray.com/bottles/gdb-10.1.big_sur.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://ftp.gnu.org/gnu/gdb/gdb-10.1.tar.xz
Already downloaded: /Users/itsc/Library/Caches/Homebrew/downloads/d6dfd55ca620ab89b3209b96be8cac6a9b85c636faf527f4c5e4bc7e7ff07cee--gdb-10.1.tar.xz
Error: Your Xcode (12.0 => /Users/itsc/Downloads/Xcode.app/Contents/Developer) is too outdated.
Please update to Xcode 12.2 (or delete it).
Xcode can be updated from the App Store.

这是让我去更新xcode,我去App Store上一看,好家伙11GB,我不就是想用个gdb吗。
发现mac上的调试工具是lldb,似乎可以直接使用,先将就使用。

lldb ./a.out

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注