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 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
时间: 2024-07-29 23:47:01

Mac - gdb配置的相关文章

quickcocos2dx3.5版本如何在mac上配置环境变量

问题描述 quickcocos2dx3.5版本如何在mac上配置环境变量 最新版本的Quick Cocos2dx如何在Mac上搭建环境变量和如何创建工程?谢谢 解决方案 执行目录下的setup.py脚本.具体请参考README.md 解决方案二: 创建工程是进入到tools/cocos2d-console/bin执行 $cocos new MyGame -p com.your_company.mygame -l cpp -d NEW_PROJECTS_DIR

php xampp-请问如何在mac上配置xampp+zend studio?

问题描述 请问如何在mac上配置xampp+zend studio? 都已经安装好了,但是怎样让他们连接起来用?我试着弄了一下,就是图片这个样子. 解决方案 现在最火的编辑器是phpstorm,炒鸡强大,自带服务器,eclipse系的不如它.你可以试试.

【IOS-COCOS2D-X 游戏开发之三】MAC下配置ANDROID NDK环境并搭建COCOS2D-X环境并ECLIPSE正常编译运行COCOS2DX自带TESTSDEMO项目!

本站文章均为 李华明Himi 原创,转载务必在明显处注明:  转载自[黑米GameDev街区] 原文链接: http://www.himigame.com/android-game/636.html 大家都知道Cocos2d-X是个多平台支持的游戏引擎,那么当今最主流的手机系统是iOS和Android,所以少不了Android的童鞋以及iOS的童鞋都偏向于Cocos2d-X引擎,而且更多的Android开发者还是习惯的IDE使用Eclipse,如今Cocos2d-X配置在Eclipse环境中的教

Mac下配置apache

一.前言     今天遇到问题,怎么配置apache在Mac上,原来Mac自带apache,只需要自己开启配置一下就行了. 二.步骤:     1.修改apache的http_conf文件         打开finder前往/private/etc/apache2,在这个文件加下有一个http.conf用文本编辑器打开.         修改第一处:查找php.得到如下结果 #LoadModule php5_module libexec/apache2/libphp5.so         去

【MYSQL数据库开发之一】MAC下配置安装数据库-MYSQL

本站文章均为 李华明Himi 原创,转载务必在明显处注明:  转载自[黑米GameDev街区] 原文链接: http://www.himigame.com/mysql/749.html 那么从今天开始陆续会更新数据库和Hibernate框架的博文,也是Himi学习的历程记录,希望大家能共同讨论和研究: OK,本篇简单介绍安装吧,首先到MySQL官方网站: http://www.mysql.com/downloads/ 如上图:点击DOWNLOAD ,进入如下界面,选择对应你的系统对应版本下载即可

mac下配置nginx+php+mysql方法说明

额...本来以为mac下可以用lnmp一键安装包的,但是使用后才发现,竟然不行... 后来使用了大家都推荐的homebrew来安装...具体教程大家可以上网搜,都不算太难... 这里具体要说说的是,安装nginx的问题...如果是用homebrew安装nginx的话,是没办法添加第三方module的...至少我找了好久,也上stackoverflow问了  都没有找到解决方法... 最后木办法,只能手动编译安装nginx,php和mysql 以及pecl的话就通过homebrew来安装... 大

Mac如何配置iOS开发环境

  为了布署iOS应用程序到Mac的iOS Simulator上,需要在Mac上安装下列工具: Platform Assistant(PAServer) 为了测试目标,RAD Studio使用Platform Assistant,它必须安装并且运行在Mac上. XCode XCode是在Mac上的开发测试环境,并且提供Mac OS X和iOS应用程序需要的程序文件. 第一步:安装PlatformAssistant 为了布署iOS App从PC到iOS Simulator或iOS Device,P

在MAC下配置自带的SVN及Versions使用

第一步:mkdir /Users/svn 第二步:svnadmin create /Users/svn/repository 第三步:修改respotitory目录下的conf目录下的文件 1.修改passwd文件 : ### This file is an example password file for svnserve. ### Its format is similar to that of svnserve.conf. As shown in the ### example belo

cocos2d-x在mac下配置安卓开发环境

前言: 我们都知道cocos2d-x是一个跨平台的游戏引擎,但如果只用它来开发iPone/iPad端的游戏,有点太杀鸡用牛刀了,如果是那样的话,cocos2d-x就没有展现出它的优势了.那我就来介绍一下用cocos2d-x如何创建一个安卓平台,并且成功的将ios游戏项目转化成安卓游戏. 操作步骤: 在中断输入pico .bash_profile打开之后输入export ANDROID_SDK_ROOT=/Users/Himi/Documents/HimiWork/AndroidTools/and