Eclipse/MinGW/CDT/GDB and problems with debugging
12,156
This seems to be a relatively frequent reoccurring issue when using eclipse +cdt with gdb. Changing the default launcher from GDB (DSF) Create Process to Standard Create Process seems to solve the issue most of the time.
You can find this option under Preferences->Run/Debug->Launching->Default Launchers:
Also make sure you are compiling with -g
debug info enabled.
![michaeluskov](https://i.stack.imgur.com/nVOxT.jpg?s=256&g=1)
Author by
michaeluskov
Updated on July 19, 2022Comments
-
michaeluskov almost 2 years
I have some C++ code and try to debug it. main.cpp:
#include <iostream> using namespace std; int main() { graph<int> a; a.add(1); a.addEdge(1,2); std::vector<int> answ = a.getAdjacent(1); for (unsigned int i = 0; i < answ.size(); i++) std::cout<<answ[i]<<std::endl; return 0; }
I have a breakpoint on "graph a;". But when I start debugging, I get:
The target endianness is set automatically (currently little endian) No source file named C:\Users\home\workspace\graphcpp\main.cpp. [New Thread 3552.0xdc8]
What's the problem?
-
DCurro almost 10 yearsI don't have a Standard Create Process; just the first displayed option, and Legacy Create Process.
-
Tzafrir over 9 yearsstandard was renamed to legacy. bugs.eclipse.org/bugs/show_bug.cgi?id=426586
-
ransh over 9 yearsThanks that solved the issue for me, but I wander why Dsf does not function correctly
-
Elod about 9 yearsI have a project from
Makefile with existing code
and I have the same problem, but I can't find this menu option? Is it in theMakefile
this setup or am I missing something? -
greatwolf about 9 years@Elod Which version are you using and do you mean you cannot find 'Preferences'
-
Elod about 9 yearsI'm using
Eclipse Version: 3.8.1
and theRun/Debug Settings
has no drop-down option (only one window, with my launch configurations). The debugging stops at a line:if (this->nextState != NULL) delete this->nextState;
. No error massage and if I executeif
step, than application stops: The target endianness is set automatically (currently little endian)<terminated, exit value: 0>gdb
-
greatwolf about 9 years@Elod Perhaps give Luna SR2 release a try -- it comes packaged with CDT 8.6.0. I just checked it out and the setup is the same except its renamed to
Legacy Create Process
as tzafrir pointed out. Make sure you have[Debug]
selected in the 'Launch Type/Mode' otherwise 'Preferred Launcher' will be empty.