You are not logged in.
Pages: 1
Hi, I have a problem with GDB. I use Eclipse on Arch i686; I have a project which builds a dynamic lybrary, which is linked by another (main) project. When I try to debug the main project, GDB is unable to place breakpoints in a .h file contained in the shared library project:
No line 60 in file "../Code/../../PamCut/CaloCuts/CaloTrackCut/../../CaloAxis2.h".
But line 60 exists and there is code there:
59 void Reset() {
60 ids.clear();
61 idp.clear();
62 q.clear();
What is happening? It's the first time that GDB plays such a trick on me. Maybe the problem is that the file is a header? I placed breakpoints in header files before, and everything was fine...
Thank you for the help.
Offline
Hello Snack!
1. Maybe the problem is that the file is a header? -> You can check it, if you places this content in a c/cpp file.
2. Do you use own Makefile in Eclipse or the builtin ?
Offline
Hi djszapi, thank you for your reply. Yes, I use a custom made Makefile, built following the Eclipse's standard ones. The strange thing is that I have other headers with code in my project, and I can place breakpoints there without any issue. Funny enough, in some cpp files instead I get the same errors I get in my troubled header, but even if Eclipse complains about being unable to resolve the breakpoint, the execution flow stops correctly at the breakpoint.
Things are pretty messed up...
Offline
It sounds to me like one of your files (the one that included that header, specifically) was not compiled with the proper debugging flags, and that's what it's having issues with. I'd double check your Makefile to ensure that everything has the -g, or whatever you're using for the debugging flag.
Offline
I did some checks: everything is compiled with -g3, and GDB has problems with breakpoints only in a specific .h file in my project, so it seems related to that specific header. Does anyone have any idea about how can I try to fix this? Thanks again.
Last edited by snack (2009-08-10 18:10:09)
Offline
Pages: 1