Eclipse debugger - unexpected breakpoint behavior

I need help using Eclipse breakpoints. I am working on a multi-threaded C ++ application using Eclipse Luna Service Release 2 RC3 (4.4.2), with GDB 7.1, on ubuntu 10.04 32-bit. I manage to set and stop at breakpoints, but when I continue, I don’t get the debugger stopping at the same place, although it periodically runs this line again and again (without stopping at the breakpoint), adding a new breakpoint lower or higher causes stop it, but when you click on the resume, he does not stop on these lines. I tried to work in non-stop mode and without it, but I still get the same unexpected result. I even tried to create a new project welcome world in which I added a while and sleep loop and set a breakpoint as a dream. It stops there, but deleting a breakpoint, resuming and adding a breakpoint again, it no longer stops ....

int main() { while(1) { sleep(1); } cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! return 0; } 

I have never seen such inexplicable behavior. Please, help...

Thanks Ran

+1
debugging eclipse gdb
Feb 20 '15 at 9:11
source share
1 answer

This is exactly the same problem as mine. I can play it as you described with your hello world project (I'm on KeplerSR2 on WindowsXP).

I saw that you found the answer I posted about it (changing the GDB start from “GDS DSF” to “Legacy Create Process Launcher”), I linked it if others are facing the same problem: questions / 123592 / ...

But I understood a little better why GDB SDF is not working properly, at least in my case. Gdb does not seem to find the source files. When I added a breakpoint, he shouted at me "There is no source file named D: 010workspaceTestGDB.cpp". Gdb doesn't seem to like the backslash ... Why is this a problem only when resuming? This is strange.

This led me to the following answer, which I hope will work for you too: keep the GDB DSF Launcher, but in Run> Debug Configurations> yourLauncher> Source tab, click Add and select "Project - path to source folders ", Select the project and put it over the" Search for default source ".

+1
Feb 20 '15 at
source share



All Articles