GDB类型在macOS Sierra上不起作用 [英] GDB kind of doesn't work on macOS Sierra
问题描述
这是我昨天第一次更新到macOS Sierra时出现的一个问题。
GDB本身运行正常。但是,不知何故,它无法运行我的程序。当我输入'run'和'enter'时,它立即崩溃并显示以下信息:
启动程序在信号SIG113,实时事件113结束时。
我的GDB基于自制软件。所以今天,我卸载了整个自制软件包并重新安装了它。在codeign之后,我仍然遇到了同样的错误。
我尝试了'sudo'和其他一些东西。谷歌不知道发生了什么。所以我想知道你们是否可能有一些神奇的解决方案。
这就是我轻松解决问题的方法。 [更新:根据已收到的反馈,尚未得到验证,似乎此解决方案适用于macOS Sierra 10.12,但不适用于macOS Sierra 10.12.2]
请参阅视频说明此处
- 退出gdb
- 使用您的文本编辑器,例如Sublime Text,在用户文件夹中保存一个名为
.gdbinit
的文件。 - 在文件中添加以下内容:
set startup-with-shell off
- 保存文件
- gdb现在可以工作
来源
https://discussions.apple.com/thread/7684629?start=0&tstart=0
https://sourceware.org/gdb/onlinedocs/gdb/Starting.html
It is a problem that appeared when I first updated to macOS Sierra yesterday.
GDB itself is running OK. However, somehow, it cannot run my program. When I type 'run' and 'enter', it immediately crashes with the information:
During startup program terminated with signal SIG113, Real-time event 113.
My GDB is based on homebrew. So today, I uninstalled the whole homebrew package and reinstalled it. After the codesign step, I still faced the same error.
I tried 'sudo' and a few other things. Google had no idea what happened. So I was wondering if you guys might have some magical solution.
This is how I easily fixed the issue. [Update: based on feedback received and yet to be verified, it seems that this solution works with macOS Sierra 10.12 but not with macOS Sierra 10.12.2]
See video instructions here
- Quit gdb
- Using your text editor e.g. Sublime Text, save a file called
.gdbinit
in your user folder. - In the file add the following:
set startup-with-shell off
- Save the file
- gdb should now work
Sources
https://discussions.apple.com/thread/7684629?start=0&tstart=0
Where is .gdbinit is located and how can I edit it?
https://sourceware.org/gdb/onlinedocs/gdb/Starting.html
这篇关于GDB类型在macOS Sierra上不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!