Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » debugger not synchronised with the source of a static library
debugger not synchronised with the source of a static library [message #799150] Wed, 15 February 2012 14:01 Go to next message
Laurent Alebarde is currently offline Laurent AlebardeFriend
Messages: 17
Registered: January 2012
Junior Member
Hi all,

I am a low C++ practitioner and Eclipse newbie, but with big expectations. I use gcc 4.5.3 under Linux 2.6.37 and Eclipse 3.5.1.

I have written a static library and a test project that use it. When I debug in the Eclipse environment, I have some strange behaviour like if Eclipse was using an old version of the source file. For example, when I step in the execution, it goes forward and backwards following a for loop. But the lines in the source code are bad. They correspond actually with an old version. As a second example, I had an algorithmic bug in my old version. The debugger returns me the results of this old version in the watch expressions, though the source file has been corrected.

At this point of time, I have to says I don't use any versioning of my projects. I will go there, but it is out of topic of the present post.

I tried to clean, build all, debug and release versions, but that changes nothing.
I deleted the Release and Debug project folder and clean/rebuild all, but it still keep somewhere the old library !

I wondered if, even if it looks stupid, Eclipse had installed my library somewhere. But a
# find /usr/local/ -iname "*myUtils*"
shows it is not the case. Indeed, everything should be in the WorkSpace.

# find /home/lalebarde/Documents/WorkSpace -iname "*myUtils*"
/home/lalebarde/Documents/WorkSpace/.metadata/.plugins/org.eclipse.core.resources/.projects/MyUtils
/home/lalebarde/Documents/WorkSpace/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/MyUtils
/home/lalebarde/Documents/WorkSpace/.metadata/.plugins/org.eclipse.cdt.core/MyUtils.1327770840397.pdom
/home/lalebarde/Documents/WorkSpace/.metadata/.plugins/org.eclipse.cdt.make.core/MyUtils.sc
/home/lalebarde/Documents/WorkSpace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prj-MyUtils.prefs
/home/lalebarde/Documents/WorkSpace/.metadata/.plugins/org.eclipse.debug.core/.launches/MyUtils Debug.launch
/home/lalebarde/Documents/WorkSpace/MyUtils
/home/lalebarde/Documents/WorkSpace/MyUtils/myUtils.cpp
/home/lalebarde/Documents/WorkSpace/MyUtils/Release/myUtils.o
/home/lalebarde/Documents/WorkSpace/MyUtils/Release/myUtils.d
/home/lalebarde/Documents/WorkSpace/MyUtils/Release/libmyUtils.a
/home/lalebarde/Documents/WorkSpace/MyUtils/Debug/myUtils.o
/home/lalebarde/Documents/WorkSpace/MyUtils/Debug/myUtils.d
/home/lalebarde/Documents/WorkSpace/MyUtils/Debug/libmyUtils.a
/home/lalebarde/Documents/WorkSpace/MyUtils/myUtils.h


I expect there is something badly configured in my project, my library, and/or my Eclipse, but I am lost.

Any clue please ?
Re: debugger not synchronised with the source of a static library [message #799157 is a reply to message #799150] Wed, 15 February 2012 14:10 Go to previous message
Laurent Alebarde is currently offline Laurent AlebardeFriend
Messages: 17
Registered: January 2012
Junior Member
Oups Embarrassed

I eventually found the cause : I did not completly rebuilt the project that call the library. I then conclude that Eclipse keep a copy of the library source files and/or symbol tables in the project and that a clean/rebuild is required when libraries are used and modified.

Should not it do it itself thought ? Isn't it a bug ?
Previous Topic:make failed
Next Topic:Urgent! Anyone know how to config mex file in CDT?
Goto Forum:
  


Current Time: Thu Apr 25 13:38:50 GMT 2024

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

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

Back to the top