Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Breakpoints removed by Eclipse Luna(First breakpoint hit removes all breakpoints, resume does not reinstall them)
icon4.gif  Breakpoints removed by Eclipse Luna [message #1558720] Sun, 11 January 2015 17:12 Go to next message
Bill Bridge is currently offline Bill BridgeFriend
Messages: 6
Registered: January 2015
Junior Member
I downloaded Eclipse Luna CDT 8.5 for Linux in December 2014, and moved an existing project from Solaris Studio to Eclipse. Eclipse breakpoints do not work after the first breakpoint pauses execution.

I tested this on the "Hello World" demo code. I put a breakpoint on both lines of code and execute with the Debug configuration. The first breakpoint stops execution and the second one does not.

Looking at the GDB trace file It is obvious why the second breakpoint is not hit. When the first breakpoint is hit, Eclipse messages gdb to delete all of my breakpoints, one at a time. When I resume execution (F8) Eclipse does not reinstall any breakpoints. I also see this when attempting to debug my own code.

This is such a blatant problem I cannot believe all CDT 8.5 users have it. No one would be able to do any debugging. There must be something about my environment that is causing this, but I do not have a clue. I am running hello.c with all default properties.
Re: Breakpoints removed by Eclipse Luna [message #1560370 is a reply to message #1558720] Mon, 12 January 2015 15:06 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
A bug with the same symptoms you mention has been fixed recently and will be released next month: http://eclip.se/442394

The deletion of breakpoints is caused by a race condition that only happens on very slow or very loaded machines.
IIRC you can work around it by deleting and re-creating the breakpoints after the program has started.

I hope this helps.

Marc
Re: Breakpoints removed by Eclipse Luna [message #1560490 is a reply to message #1560370] Mon, 12 January 2015 16:31 Go to previous messageGo to next message
Bill Bridge is currently offline Bill BridgeFriend
Messages: 6
Registered: January 2015
Junior Member
Thank you for the explanation. My Linux server is actually a virtual machine in a huge data center somewhere in Texas, so it could be slow.

I tried deleting and reinserting the breakpoints, but they are deleted as soon as they are reinserted. See the gdb trace I uploaded. I added some lines with **** on them to show where I was.

Is there any other work around? Maybe using nice -20 on the eclipse command?

Is it possible to get the bug fix as a standalone patch?
Re: Breakpoints removed by Eclipse Luna [message #1560499 is a reply to message #1560490] Mon, 12 January 2015 16:39 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
Try this: after the bp gets deleted, right-click on it and open its properties. Then choose the 'filter' page. Select everything (the bug makes it that they are not selected by default).
Re: Breakpoints removed by Eclipse Luna [message #1560654 is a reply to message #1560499] Mon, 12 January 2015 18:43 Go to previous messageGo to next message
Bill Bridge is currently offline Bill BridgeFriend
Messages: 6
Registered: January 2015
Junior Member
Thanks for the suggestion, but it did not help. When I open the filter page in the bug properties the process and thread are already checked. I clicked OK but the breakpoints were not installed. I also tried disabling the process, then going back to properties and re-enabling it.
Re: Breakpoints removed by Eclipse Luna [message #1560662 is a reply to message #1560654] Mon, 12 January 2015 18:50 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
Ok, so you run your process and it stops at main. Then you double-click on the editor to create a breakpoint but you do _not_ see a checkmark on the blue circle (the checkmark indicates the bp was installed properly), and you saw a -break-delete. Then you open the breakpoints properties for that bp and both the process and the thread are selected? Is that right? And when you press ok in that dialog, the checkmark does not appear?

If that is the case, then it sounds like a different problem. Are you debugging more than one session at once? http://eclip.se/444395

I'm not sure if this can help, but try to go to the eclipse gdb console (select the 'gdb' node in the debug view to make the right console come to the top) and set your breakpoint there e.g., break myFile.cc:28 or even just break 28 if there is only one file.
Re: Breakpoints removed by Eclipse Luna [message #1560863 is a reply to message #1560662] Mon, 12 January 2015 21:28 Go to previous messageGo to next message
Bill Bridge is currently offline Bill BridgeFriend
Messages: 6
Registered: January 2015
Junior Member
Yes that is exactly what is happening. However when I double click to create the breakpoint, I see the checkmark briefly appear and go away.

I am only debugging the hello world demo project in one session.

Thanks for telling me about the gdb console. I can put breakpoints in that way. It is a lot better than using emacs for debugging my program.
Re: Breakpoints removed by Eclipse Luna [message #1563992 is a reply to message #1560863] Wed, 14 January 2015 14:40 Go to previous messageGo to next message
Marc Khouzam is currently offline Marc KhouzamFriend
Messages: 357
Registered: July 2009
Senior Member
Bill, could you install a recent non-released CDT to see if you still have the problem? We've been working on bp bugs recently, but I'm worried you might have found another problem.
To do that:
1- cp your eclipse installation so that you can revert to the original
2- in the copy, start eclipse and got to Help->Install new software
3- use the site: https://hudson.eclipse.org/cdt/job/cdt-master/lastSuccessfulBuild/artifact/releng/org.eclipse.cdt.repo/target/repository/
4- choose what you want. Simplest is to take "C/C++ Development Tools" which is the first element of the first group
5- then try to reproduce the problem

Much appreciated

Marc
Re: Breakpoints removed by Eclipse Luna [message #1564454 is a reply to message #1563992] Wed, 14 January 2015 20:20 Go to previous messageGo to next message
Bill Bridge is currently offline Bill BridgeFriend
Messages: 6
Registered: January 2015
Junior Member
This is very strange.

I created a new eclipse environment:
cd /scratch/eclipse/
cp -r eclipse Xeclipse

I started up the eclipse copy
cd Xeclipse
./eclipse &

I created a new workspace when it started. Then created a C project "hello" with the project type "hello World ANSI C Project". Built hello and debugged it. It stopped at main as expected. I double clicked to add a breakpoint on the return statement. The checkmark was on the breakpoint (this is new). I resumed and the new breakpoint worked!. However, I decided I wanted to see a variable value at the breakpoint but hello world does not have a variable so I added one. I deleted all breakpoints and started the debugger. Inserted the return breakpoint when the main breakpoint was hit, but no checkmark this time, and it was not hit. I tried undoing my edits and restarting the debugger, but the problem persisted. I am now in a state where the breakpoint on the return statement works if the breakpoint is still in the breakpoints window when I start the debugging session, but it does not work if I delete the breakpoints and double click on the return line when paused at entry to main (I have reproduced this about 10 times). After double clicking, the checkmark briefly flashes on then goes away.

Note that with the eclipse that I downloaded in December the second breakpoint never works regardless of how it is set.

I have attached 3 gdb traces:
gdb_trace_production.txt - failed breakpoint before upgrading to new software.
gdb_trace_experimental.txt - failed breakpoint with new software
gdb_trace_success.txt - successful breakpoint with new software when breakpoint is set before starting debugger

I wonder if this could have anything to do with the java vm I am running. I have not updated it for about a year and a half. My current version is:
bash-3.2$ java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
Re: Breakpoints removed by Eclipse Luna [message #1589496 is a reply to message #1564454] Wed, 28 January 2015 13:31 Go to previous messageGo to next message
Alvaro Sanchez-Leon is currently offline Alvaro Sanchez-LeonFriend
Messages: 9
Registered: January 2010
Junior Member
This issue seems to be related to the following bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=435144

My assumption is that you have an environment with a GDB version older than 7.2.

If so, would it be possible for you to move to a newer version ?

Re: Breakpoints removed by Eclipse Luna [message #1655031 is a reply to message #1589496] Fri, 06 March 2015 23:45 Go to previous messageGo to next message
Bill Bridge is currently offline Bill BridgeFriend
Messages: 6
Registered: January 2015
Junior Member
Sorry I did not see your reply for a couple of months. Typing commands to the gdb console is working well for me so I was no longer concerned. Yes my GDB version is 7.0.1. However I cannot change it since I do not have admin privilege. It is managed by Oracle IT.
Re: Breakpoints removed by Eclipse Luna [message #1698556 is a reply to message #1655031] Tue, 16 June 2015 11:53 Go to previous message
Alvaro Sanchez-Leon is currently offline Alvaro Sanchez-LeonFriend
Messages: 9
Registered: January 2010
Junior Member
Just to let you know that the related bug is now fixed and available from the master branch in the git repository and will be officially released in CDT 8.7 on June 24th.

Previous Topic:Error navigation not working in eclispe luna for build wrapper scrips(build.sh)
Next Topic:Remote debugging automatically starts server
Goto Forum:
  


Current Time: Thu Apr 18 19:36:21 GMT 2024

Powered by FUDForum. Page generated in 0.04087 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top