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

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
  • 7,543
  • 4
  • 40
  • 50
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
  • 118,129
  • 19
  • 204
  • 237
  • brew.io - much nicer interface than macports and it doesn't want root privileges to run – Petesh Oct 23 '13 at 08:45
  • 1
    @Petesh Each to his own, but I prefer macports. – trojanfoe Oct 23 '13 at 08:46
  • I cant find any tutorial explaining how to install macports on OSX mavericks. – Roy Weinstein Oct 23 '13 at 12:18
  • @RoyWeinstein Ah, yeah that will be a problem as I don't believe they've released for Mavericks yet. I run on my Mavericks using the "trunk" version of macports which works fine. Check this: https://trac.macports.org/wiki/howto/RunningTrunk – trojanfoe Oct 23 '13 at 12:29
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
  • 977
  • 11
  • 24