问题
There are lots of help around regarding the incompatibility of Sierra and gdb, and everyone says that the best solution is waiting.
The problem seems to still persist, could anyone please help me how I can solve it?
I have already tried this and it does not work on my Sierra.
GDB kind of doesn't work on macOS Sierra
Thanks
回答1:
A fix has been created, but not merged and released yet. In the meantime, I have patched the most recent release of GDB with the changes and have things working with the latest version of Sierra. You can access my repo below and compile from scratch. Be sure to code sign the new binary and "set startup-with-shell off" in .gdbinit.
https://github.com/joshwells/binutils-gdb
回答2:
None GDB 7.11 or 7.12.1 will not work on Sierra 10.12.4 In short it's because of Apple security upgrade. We need to wait for re-enabling when some new version will shows up.
Easy WA is to use LLDB as a debugger for now. Sample instructions here
Another LLDB instruction here
来源:https://stackoverflow.com/questions/43188431/gdb-on-macos-sierra-10-12-4