Mac - gdb配置

简介: 问题现象unable to find mach task port for process-id *** (os/kern) failure (0x5) (please check gdb is codesigned - see taskgated(8))参考1(main) 参考2 文章就暂不翻译了,一步一步看,Easy for Ucode-si

问题现象

unable to find mach task port for process-id *** (os/kern) failure (0x5) 
(please check gdb is codesigned - see taskgated(8))

参考1(main)
参考2

文章就暂不翻译了,一步一步看,Easy for U

code-signing.txt [plain text]
On MacOSX lldb needs to be code signed. The Debug and Release builds
are set to code sign using a code signing certificate named
lldb_codesign.

If you don’t have one yet you will need to:
- Launch /Applications/Utilities/Keychain Access.app

  • In Keychain Access select the “login” keychain in the “Keychains”
    list in the upper left hand corner of the window.

  • Select the following menu item:

    Keychain Access->Certificate Assistant->Create a Certificate…

  • Set the following settings

    Name = lldb_codesign
    Identity Type = Self Signed Root
    Certificate Type = Code Signing

  • Click Continue

  • Click Continue
  • Click Done
  • Click on the “My Certificates”
  • Double click on your new lldb_codesign certificate
  • Turn down the “Trust” disclosure triangle

    Change:
    When using this certificate: Always Trust

  • Enter your login password to confirm and make it trusted

The next steps are necessary on SnowLeopard, but are probably because of a bug
how Keychain Access makes certificates.

  • Option-drag the new lldb_codesign certificate from the login keychain to
    the System keychain in the Keychains pane of the main Keychain Access window
    to make a copy of this certificate in the System keychain. You’ll have to
    authorize a few more times, set it to be “Always trusted” when asked.
  • Switch to the System keychain, and drag the copy of lldb_codesign you just
    made there onto the desktop.
  • Switch to Terminal, and run the following:

sudo security add-trust -d -r trustRoot -p basic -p codeSign -k /Library/Keychains/System.keychain ~/Desktop/lldb_codesign.cer

  • Right click on the “lldb_codesign” certificate in the “System” keychain (NOT
    “login”, but the one in “System”), and select “Delete” to delete it from
    the “System” keychain.
  • Reboot
  • Clean and rebuild lldb and you should be able to debug.

That should do it.


PS

最后记得加上这一句:

sudo codesign -s lldb_codesign /usr/local/bin/gdb
相关实践学习
阿里云图数据库GDB入门与应用
图数据库(Graph Database,简称GDB)是一种支持Property Graph图模型、用于处理高度连接数据查询与存储的实时、可靠的在线数据库服务。它支持Apache TinkerPop Gremlin查询语言,可以帮您快速构建基于高度连接的数据集的应用程序。GDB非常适合社交网络、欺诈检测、推荐引擎、实时图谱、网络/IT运营这类高度互连数据集的场景。 GDB由阿里云自主研发,具备如下优势: 标准图查询语言:支持属性图,高度兼容Gremlin图查询语言。 高度优化的自研引擎:高度优化的自研图计算层和存储层,云盘多副本保障数据超高可靠,支持ACID事务。 服务高可用:支持高可用实例,节点故障迅速转移,保障业务连续性。 易运维:提供备份恢复、自动升级、监控告警、故障切换等丰富的运维功能,大幅降低运维成本。 产品主页:https://www.aliyun.com/product/gdb
目录
相关文章
|
5月前
|
监控 网络虚拟化
配置远程MAC镜像示例
配置远程MAC镜像示例
|
5月前
|
监控 网络虚拟化
配置本地MAC镜像示例
1. 创建VLAN10,将Switch与主机相连的接口加入VLAN10,实现主机与Switch间的二层互通。 2. 配置接口GE0/0/4为本地观察端口,负责向Server转发镜像报文。 3. 在VLAN10内配置MAC镜像,将VLAN10内指定MAC地址的主机访问Internet的流量复制一份到本地观察端口。
|
5月前
|
定位技术
Mac电脑报错“托管配置文件格式不正确”的解决方法
Mac电脑报错“托管配置文件格式不正确”的解决方法
293 1
|
11天前
|
Oracle Java 关系型数据库
Mac电脑上安装和配置Flutter开发环境
Mac电脑上安装和配置Flutter开发环境
35 3
|
25天前
|
Web App开发 开发工具 Android开发
【Flutter】Flutter安装和配置(mac)
【Flutter】Flutter安装和配置(mac)
|
2月前
Mac每次都要执行source ~/.bash_profile配置的环境变量才生效
Mac每次都要执行source ~/.bash_profile配置的环境变量才生效
112 2
|
2月前
|
Java 应用服务中间件 Maven
Mac使用Idea配置传统SSM项目(非maven项目)
Mac使用Idea配置传统SSM项目(非maven项目)
37 1
|
2月前
|
移动开发 JavaScript 开发工具
Mac 10.9x下安装配置phonegap3.0开发环境 (涉及android sdk配置)
Mac 10.9x下安装配置phonegap3.0开发环境 (涉及android sdk配置)
|
2月前
|
Java Maven
Mac Maven环境变量配置 zsh: command not found: mvn
Mac Maven环境变量配置 zsh: command not found: mvn
133 0
|
4月前
|
开发工具 git
mac git配置 idea
mac git配置 idea
57 1