I'm using eclipse with CDT on mac osx mavericks. I've installed gdb using macports. But I'm not able to set custom debugger in preference set.
When I go to preferrnce->c++->Debug->? there is no debug option where I can set custom debugger. Online eclipse CDT documentation suggest debug menu in this preference set. I've tried Kepler as well as Luna but still issue persist.
I'm not sure what's wrong with my eclipse. Please help. Thanks
http://i.stack.imgur.com/RYD9A.png
Open "Debug Configurations" from the debugging icon, then choose Debugger tab and specify the gdb command path "e.g. /usr/local/bin/gdb"
After that you have to give gdb permission to control other processes, follow steps mentioned in the reply of this question:
debugging in eclipse using gdb on mac - Failed to execute MI command: -exec-run
Related
I have a problem in debugging OMNeT++ in my Macbook Pro.
I installed OMNeT++ 5.6.2 on my MBP having macOS Catalina 10.15.5 and tried to run tictoc tutorial. It runs fine, however there is a problem with debugging.
I know that masOS no longer supports gdb and we have to install gdb through Homebrew or Macports and then configure it. I already have set up gdb.
In order to test gdb, I installed eclipse CDT, set up and configure GDB, then started debugging.
It was debugging fine in eclipse. However, when I debug in OMNeT++, it stucks at "Configuring GDB".
I also tried with OMNeT++ 5.5.1 but having the same problem.
I also asked it before at stack overflow, but couldn't find appropriate solution.
MyPreviousQuestion
Does anyone know how to fix OMNeT++ debugging issue on macOS?
Just like in the other SO question: I would also advise to try to use OMNeT++ 6.0 preview 8 on macOS. I have successfully built it on macOS 10.15 and as suggested in the other SO thread, it does use lldb instead of gdb.
An alternate workaround could be to use VS Code with an appropriate extension. I have just published a blog entry related to debugging OMNeT++ models:
https://omnetpp.org/blog/2020/07/05/omnetpp-debugging-tips.html
When I try to debug my c++ program in Eclipse (Neon 4.6.2 on mac), the progress bar stops at 33% and the operation eventually times out. I get an error saying:
Error in services launch sequence -
Command '-list-features' is timed out
I've verified my GDB build and uninstalled and reinstalled using brew multiple times. GDB works perfectly in terminal, but I'm not able to run it in eclipse at all and I greatly prefer having a GUI when debugging. I have ensured that the path to the debugger in the eclipse debug configuration is correct. In addition, I've tried adding -g as a debugging flag.
Any help/suggestions would be great!
This sounds like a known problem with CDT 9.2, See Bug 509737. It is fixed for 9.2.1 released in a month or so. Your choices are to downgrade CDT to 9.1 or to install the most recent, but unreleased, build of 9.2.1.
I am using latest version of Eclipse ie Kepler in that how to update/install the "GDB OpenOCD Debugging" plug-in tool.
You can download the plugin here: http://gnuarmeclipse.livius.net/blog/plugins-install/
Just paste http://gnuarmeclipse.sourceforge.net/updates link into the "Work with:" field of the "Install new software" window of Eclipse (available from the Help main menu).
There are several components and GNU ARM OpenOCD Debugging Support is one of them.
But latest versions of OpenOCD work very well with the regular GDB Hardware Debugging.
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.
I am trying to use Eclipse CDT with Cygwin, but I have problems with the debugger. I have done the following:
- installed Eclipse CDT
- installed Cygwin with gcc, g++ make and gdb
- added c:\cygwin\bin to PATH
- created a new Hello World application in Eclipse
Compiling went well from Eclipse. The first problem was that I had to set the executable manually in the run configuration. Having done this, I running also worked. But when I try to debug, I get the following error:
When I switch to debug perspective, I can see the following:
I tried different debug configurations, but I always get the same result.
First, make sure gdb is located on c:\cygwin\bin. I believe executing which gdb on cygwin might help you do that.
Now, instead of adding this information to PATH and making it available to all your Windows applications, try adding it to your project settings inside Eclipse, like this guy did:
http://www.benjaminarai.com/benjamin_arai/index.php?display=/eclipsecygwingcc.php