GDB kind of doesn't work on macOS Sierra

前端 未结 8 750
梦毁少年i
梦毁少年i 2020-12-02 07:55

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

8条回答
  •  独厮守ぢ
    2020-12-02 08:12

    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

提交回复
热议问题