博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Mac - gdb配置
阅读量:7093 次
发布时间:2019-06-28

本文共 2027 字,大约阅读时间需要 6 分钟。

问题现象

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

文章就暂不翻译了,一步一步看,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

转载地址:http://ensql.baihongyu.com/

你可能感兴趣的文章
学习笔记: CSS3 鼠标悬停动画
查看>>
ylbtech-cnblogs(博客园)-数据库设计-7,News(新闻)
查看>>
WCF 基础简介
查看>>
用Soap消息调用Web Services(续)
查看>>
php数据库操作封装类
查看>>
atitit.导出excel的设计----查询结果 导出为excel的实现java .net php 总结
查看>>
[LeetCode] Partition List 划分链表
查看>>
以Ajax方式显示Lotus Notes视图的javasript类库----NotesView2
查看>>
ylbtech-memorandum(备忘录)-数据库设计
查看>>
spm中头动绘图的理解,自带数据集
查看>>
车辆管理系统之继续自己的任务(五)
查看>>
谁该赋予一款产品灵魂?
查看>>
自我总结(八)- 新学期
查看>>
I.MX6 wm8962 0-001a: DC servo timed out
查看>>
ACM进阶计划
查看>>
Spring3 表达式语言(SpEL)介绍
查看>>
【Java学习笔记之七】java函数的语法规则总结
查看>>
5.23. msgpack
查看>>
【Java学习笔记之三十三】详解Java中try,catch,finally的用法及分析
查看>>
IE6 png图片实现半透明的方法
查看>>