zoukankan      html  css  js  c++  java
  • macos下默认的调试工具是lldb

    遇到个问题:我在看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
    
  • 相关阅读:
    三大家族的作用和区别
    正则表达式
    Math的方法
    数组API方法
    面向对象方法
    数组的常用方法
    对象和数组的遍历方法
    js运算符(运算符的结合性)
    i++和++i的运算符
    flex
  • 原文地址:https://www.cnblogs.com/shanchuan/p/15144801.html
Copyright © 2011-2022 走看看