mac上安装gdb及使用中碰到的问题
来源:互联网 发布:网络数据拦截分析工具 编辑:程序博客网 时间:2024/04/30 03:43
- 安装homebriew,执行命令
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
根据官方介绍,其功能是:“使用 Homebrew 安装 Apple 没有预装但 你需要的东西。”。
完全基于 git 和 ruby,所以自由修改的同时你仍可以轻松撤销你的变更或与上游更新合并。
$ brew edit wget # 使用 $EDITOR 编辑!
class Wget < Formula
homepage "https://www.gnu.org/software/wget/"
url "https://ftp.gnu.org/gnu/wget/wget-1.15.tar.gz"
sha256 "52126be8cf1bddd7536886e74c053ad7d0ed2aa89b4b630f76785bac21695fcd"
def install
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end
end- 然后执行 brew install gdb 进行安装
- 安装好了以后执行,出错,提示:
“Unable to find Mach task port for process-id 7532: (os/kern) failure (0x5).”
原因出于苹果系统的安全性,想想现在gdb是要对另一个进程进行全面的掌控,这件事不能随便轻易允许。
因此需要创建证书,然后 :
codesign -s gdb_cert /usr/local/bin/gdb 对gdb进行codesign签名方可允许。 - 现在执行gdb可以打开,但是依然运行出错,提示:
“During startup program terminated with signal ?, Unknown signal.”
这与sierra 的 System Runtime Integrity Protection 系统有关。
据网友对Apple官网上的SIP介绍的总结,有以下几个关键点:
+ Security Integrity Protection applied to every process, including privileged code running unsandboxed.
+ Extends additional protections on system components on disk and at runtime
+ System binaries only can be modified by Apple Installer and Software Updater, and no longer permit runtime attachment or code injection.
SIP系统保护机制可以用 crsutil status/disable/enable/clear 进行查看和修改。
解决方法暂时有2个:
+ 关闭SIP。步骤:
进入恢复模式(开机时按住Command+R,亲测有效),然后打开terminal 执行 csrutil disable,关闭SIP。
+ 关闭 startup-with-shell。步骤:
在.gdbinit中加入 set startup-with-shell off。
经过对比,在不关闭startup-with-shell的情况下,关闭SIP确实可以解决5中的问题.
0 0
- mac上安装gdb及使用中碰到的问题
- 关于mac osx上安装 freetds unixodbc 及安装碰到的问题
- 在Mac上安装pyv8碰到的问题。
- mac 上安装 gdb
- Mac上安装gdb
- mac上安装gdb
- shell 使用中碰到的问题及解决方法
- Redis的安装及碰到的问题
- 安装ftp碰到的问题及解决方法
- mesa安装碰到的问题及解决
- 使用AsyncHttpClient碰到的问题及解决方法
- 使用AsyncHttpClient碰到的问题及解决方法
- 使用AsyncHttpClient碰到的问题及解决方法
- 使用AsyncHttpClient碰到的问题及解决方法
- Mac安装Brew & 如何在mac os中安装gdb及为gdb进行代码签名
- 在oracle中安装碰到的问题
- linux安装中碰到的问题
- ubuntu中安装virtualbox碰到的问题
- bzoj1053 [HAOI2007] 反素数ant
- 判断输入的文字是否为空
- sprintf() sscanf()的使用
- 让Excel工作簿中宏自动运行的两种方法
- PyCharm集成开发环境配合nginx搭建部署环境
- mac上安装gdb及使用中碰到的问题
- 关于头文件和命名空间
- 4558: [JLoi2016]方
- c++-静态成员函数和非静态成员函数的区别
- Remove Linked List Elements
- JAVA多线程基础实验编码及学习笔记总结
- 使用Protocol Buffers的C语言拓展提速Python程序的示例
- 数字IC设计工程师的知识结构
- 使用FusionCharts绘制多折线图