C++ Debugging Tool For Mac Sierra Terminal

Viewed 760 times

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?

A T - studentA T - student
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.

Browse other questions tagged c++macosnetbeans or ask your own question.

Active1 year, 3 months ago

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:)

aFactoriaaFactoria

3 Answers

Sierra

Debugging Tools For Windows Vista

  1. download the most recent GDB from https://www.sourceware.org/gdb/download/

  2. expand the gdb-7.12.1.tar.xz file: tar xopf gdb-7.12.1.tar.xz

  3. cd gdb-7.12.1 in terminal to open the gdb folder

  4. then follow the instructions in the README file in the gdb folder, or simply follow the following steps:

  5. ./configure, wait for the terminal

  6. make and wait again (which can take some time)

  7. sudo make install

Now gdb is installed at /usr/local/bin/

aFactoriaaFactoria

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.

AlbertAlbert
29.8k45 gold badges183 silver badges313 bronze badges

You can also use homebrew to get gdb in mac os:install-gdb-macos-sierra

Debugging Tools For Windows 8.1

FrankyFredFrankyFred

Not the answer you're looking for? Browse other questions tagged macosgdb or ask your own question.