Debugging Tool For Android Phone
With a free Apple Developer membership it is also possible to download the additional tools for Xcode which includes the Hardware IO Tools. (But you cannot download the beta versions of MacOS and iOS). How to install gdb on MacOS terminal Sierra. Ask Question. I encountered this problem when writing C in sublime text and trying to compile and debug using terminal. Sorry for any unclearness. – aFactoria Jan 31 '17 at 19:58. Do you know if this works on Mac OS High Sierra (version: 10.13.2 (17C88)).
I have been trying to enable debugging on NetBeans 8.2 C++ (OS X - Sierra - 10.12.5) without success. I have tried the following:
Using Mac Ports version of gdb with code-signing: result: gdb gives a standard error:
Unable to find Mach task port for process-id 3016: (os/kern) failure (0x5). (please check gdb is codesigned - see taskgated(8))
Using Mac's /usr/bin/llvm: result:
GDB has unexpectedly stopped with return 0
Anyone have any success getting this to work?
Browse other questions tagged c++macosnetbeans or ask your own question.
I searched online about how to install gdb on macOS Sierra 10.12.2 but failed on the methods I could find. Then I figure out the following way which is easy and works fine on my machine. hope it may help you too:)
3 Answers
Debugging Tools For Windows Vista
download the most recent GDB from https://www.sourceware.org/gdb/download/
expand the gdb-7.12.1.tar.xz file:
tar xopf gdb-7.12.1.tar.xz
cd gdb-7.12.1
in terminal to open the gdb folderthen follow the instructions in the README file in the gdb folder, or simply follow the following steps:
./configure
, wait for the terminalmake
and wait again (which can take some time)sudo make install
Now gdb is installed at /usr/local/bin/
C++ Debugging Tool For Mac Sierra Terminal Commands
Note that you might want to try/use LLDB (lldb
) instead. This is now the default (don't know about 10.12, but on 10.13 it is installed, when you install the Xcode utilities). It even comes with a nice curses GUI, but otherwise a shell very similar to GDB.
You can also use homebrew to get gdb in mac os:install-gdb-macos-sierra