GDB Version error on Eclipse CDT in Ubuntu 16.04 - gdb

I installed Eclipse Oxygen CDT on Ubuntu 16.04. I am using the default gdb installed.
When I try to launch the debugger in eclipse, I get the following error:
Error with command: gdb -version
I suspected that this could be because eclipse was unable to find the gdb program, so i mentioned the whole path of the gdb program in the "Preferences =>C/C++ => GDB" options.
Still the error persists. Can anybody tell me how I can fix this error? Thanks in advance for your help.

check gdb version from c:\MINGW\bin\gdb32.exe "I have this version"
then got Eclips >> Preferences >> C/C++ >> GDB
then in GDB path "First block" click browse then insert the GDB path
Done ^-^

Related

Error when using GDB in Eclipse: "Command '-list-features' is timed out"

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.

C++ debugger "gdb.exe --version" error in Eclipse Mars+MinGW

When debugging a C++ project in Eclipse I get the following error:
'Launching Project.exe' has encountered a problem.
Could not determine GDB version using command:
D:\Programme\MinGW\bin\gdb.exe --version
Some Posts on Stackoverflow suggested linking MinGW\bin\gdb.exe directly in the C++/GDB settings solves the problem, but as you can see it didn't for me.
Any suggestions?
Edit: Tried mingw-get.exe install gdb in MinGW\bin, got an error that said the latest version is already installed.
I found the solution for my --version error:
When I ran $ gdb --version from the MinGW shell I got an error message saying zlib1.dll was not found.
I copied zlib1.dll from the \Debug folder of my C++ project into MinGW\bin and now it's working.
If gdb --version works in cmd, then try change path in eclipse - run - debug configurations - debugger - GDB debugger to C:\MinGW\gdb64\bin\gdb.exe, the default one in C:\MinGW\bin could be 32-bit.

Eclipse CDT cannot debug using gdb on Mac

I have a C++ project imported to Eclipse CDT. I can build and run the project using Makefile and argument settings. However, when I tried to add a debug point and run "debug as local c/c++ application", it throws me an error of "Launching projectName" has encountered a problem. Error with command gdb --version
By expanding the Details, it gives: Error with command: gdb --version
Cannot run program "gdb": Unknown reason
I installed the gdb by Macports before. If I enter command ggdb it returns the version info. If I type which ggdb, it gives /opt/local/bin/ggdb. I tried to add "PATH" to debug configuration -> environment variables and give the path value to it, but it did not work. How should I set the path and link the path please? And what should the variable name be.
The gdb version on my machine is GNU gdb (GDB) 7.7.1
Added: I looked up which ggdb and used the link James provided to change gdb debugger to browse to that path. But it did not work still.
Thanks.
It looks like Eclipse is using the default gdb that was on the system before you installed ggdb from macports. This link shows how to change the debugger settings, change it to ggdb which is the name Macport uses.
After installing ggdb from Macports you will have to sign it with a certificate so it will be allowed to control other processes, take a look at "Certifying GDB" here. After creating the certificate, make sure you select the correct name when signing:
$ codesign -s gdb-cert $(which ggdb) /// 'ggdb'

eclipse cdt on mac osx not showing debug menu in preference set

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

Debugger for C++ eclipse gives the following error. 'Launching program name' has encountered a ... Error while launching command: gdb --version

I've always worked around the debugger issue, but now it has gotten too annoying. I'm working on more complex programs and can't anywhere if I cant debug my programs. Has any one else been able to fix this issue in eclipse? It works for java, but not more my C++ plugin from minGW
Debbugger for C++ eclipse gives the following error. 'Launching program name' has encountered a problem. Error while launching command: gdb --version
Assuming you are using Windows and have MinGW installed, you only need to locate the gdb executable in the MinGW bin folder. This can be done on the "Main" tab in the "Debugger" configuration of Eclipse: