1

The reason I need to set up a custom debugger is that the debugger simply doesn't work in eclipse: Error while launching command: gdb --version. I have installed the command line tool (late Oct version), and the solution here Set up g++ on OS X doesn't work either.

I am trying trojanfoe's solution here: debugger for c++ using eclipse on mac

but I am stuck: (1) The gcc, gdb install finishes with an instruction to: You will need to make sure /System/Library/LaunchDaemons/com.apple.taskgated.plist has the '-p' option ...

(for the ProgramArguments key)

But I can't edit this file, can't change its mode, how do I make sure it has -p option? (it only has -s in my mac)

(2) How do I set up the gdb debugger in eclipse c++ IDE? I know trojanfoe's solution has pointed to some websites, but it looks very confusing to me, so would appreciate some more details. Thank you.

Community
  • 1
  • 1
karl
  • 11
  • 1
  • Instructions for how to edit com.apple.taskgated.plist here: [stackoverflow.com: How to get gdb installed with homebrew code signed?](http://stackoverflow.com/a/20048346/2554472). – Mark Plotnick Feb 24 '14 at 18:57
  • AFAIK this is bug in eclipse. Can you run "gdb --version" from command line? If you can, try cleaning up your path (this helps on Windows). – dbrank0 Feb 25 '14 at 08:22
  • Thank you both. Indeed I found the way to edit the taskgated.plist file as Mark Plotnick mentioned. I couldn't run gdb --version from command line as dbrank0 suggested. The final way I figured out is that on Mac, gdb is called ggdb, therefore once I point eclipse cdt's debugger to /opt/local/bin/ggdb, everything then works. Thank you all! – karl Feb 27 '14 at 03:02

0 Answers0