GDB 不适用于 macOS Sierra [英] GDB kind of doesn't work on macOS Sierra

查看:20
本文介绍了GDB 不适用于 macOS Sierra的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

  1. Quit gdb
  2. Using your text editor e.g. Sublime Text, save a file called .gdbinit in your user folder.
  3. In the file add the following: set startup-with-shell off
  4. Save the file
  5. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆