7

After I finally setup my mac to work with eclipse, I can't debug.

I've tried to google for help but non of the answers worked for me.

so, I need someone to help me install and use a debugger on eclipse for c\c++.

I have Xcode 5.0 installed.

Thanks for your help

Roy

Roy Weinstein
  • 71
  • 1
  • 1
  • 2
  • Here is my solution http://stackoverflow.com/questions/19877047/eclipse-gdb-macosx-mavericks – Rick64 Nov 09 '13 at 14:25

3 Answers3

3

You have got several options:

  1. Install GDB with MacPorts or Homebrew, as mentioned by trojanfoe and Charles Chow.
  2. Use LLDB-MI from LLDB team; note that LLDB-MI does not come with the native LLDB on OS X, meaning you have to build LLDB your own with options to switch on the feature.
  3. Use third-party LLDB-MI2 (see the page for reasons why he needs another Machine Interface)

All of these three options require a lot of configuration and are error-prone. I guess you may want to think twice when you prefer Eclipse to Xcode on OS X.

Franklin Yu
  • 8,920
  • 6
  • 43
  • 57
0

It looks like eclipse doesn't support lldb, so you are probably better off ignoring the Xcode toolchain and instead installing Macports and g++/gdb from there:

$ sudo port install gcc49 gdb

It should then just be a case of setting up this new toolchain in eclipse; perhaps using:

how to add custom tool chain to eclipse CDT

(if not google "eclipse cdt configure toolchain")

Community
  • 1
  • 1
trojanfoe
  • 120,358
  • 21
  • 212
  • 242
0

I found this tutorial teaches you how to install and setup GDB for eclipse on Mac OS X. It works on my machine. You need install Home Brew first.

Charles Chow
  • 1,027
  • 12
  • 26