Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse -Error while launching command: gdb --version

I am using Eclipse on a Windows system (64-bit) for C++ code and the compiler is GCC/G++. I have created a .exe and in the end it is showing as amd64/le, and I am not able to debug. When I am trying to debug, I am getting the error as

Error while launching command: gdb --version CreateProcess error=2, The system cannot find the file specified

  1. Can you please let me know what is that amd64/le?
  2. What is need to be done to debug?
like image 899
Krishna Mohan Avatar asked Jul 26 '16 13:07

Krishna Mohan


People also ask

Does Eclipse use GDB?

GDB. The tool used by Eclipse Embedded CDT for debugging is the Arm version of GDB, the venerable GNU debugging tool.

How do you invoke GDB?

Invoking GDB. Invoke GDB by running the program gdb . Once started, GDB reads commands from the terminal until you tell it to exit. You can also run gdb with a variety of arguments and options, to specify more of your debugging environment at the outset.

What is GDB launch?

Gdb is a debugger for C (and C++). It allows you to do things like run the program up to a certain point then stop and print out the values of certain variables at that point, or step through the program one line at a time and print out the values of each variable after executing each line.

At which point does GDB stop a running program?

gdb will stop your program at whatever line it has just executed. From here you can examine variables and move through your program.


1 Answers

You can have a look at this link. It helped me solve this problem just now,

The steps to follow are:

  • Select Debug Configurations
  • and click the Debugger tab
  • now choose a GDB debugger by clicking Browse and selecting gdb.exe from the "bin" folder of your MinGW folder. If gdb is not present, navigate the command prompt to the bin folder and run mingw-get.exe install gdb.

(Mostly it should be in something like C:\Min_GW).

like image 105
werber bang Avatar answered Sep 22 '22 10:09

werber bang