Bug 66765

Summary: gdb can't find source files when debuging qmake projets
Product: [Applications] kdevelop Reporter: tal <talzarfati>
Component: CPP DebuggerAssignee: KDevelop Developers <kdevelop-devel>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: git master   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description tal 2003-10-28 14:05:10 UTC
Version:           3.0b1 from cvs (using KDE KDE 3.1.4)
Installed from:    Compiled From Sources

while trying to debug QMake projects generated with KDevelop, gdb sais it can't find the source files.
Comment 1 Jens Dagerbo 2003-10-28 17:58:00 UTC
Verified.

This is what happens when I try to debug a "QMake project - Application" with every setting unchanged:

(gdb) cd /home/jens/projects/delete_qmake_debuggertest/./bin 
(gdb) break delete_qmake_debuggertest.cpp:134 
No source file named delete_qmake_debuggertest.cpp.

It seems the debugger part assumes the source files are found in the same path as the executable, but the qmake templates sets it up so that the source is found in 
/home/jens/projects/delete_qmake_debuggertest/src/

I'm not sure if the problem is the debugger or the qmake project, but I suspect the former.
Comment 2 Amilcar do Carmo Lucas 2003-10-28 18:00:27 UTC
remove the libtool in the project "options ...-> debugger"
Comment 3 Jens Dagerbo 2003-10-28 18:30:20 UTC
libtool isn't in there to begin with, so I doubt it's involved.. ;)
Comment 4 Andreas Koepfle 2003-10-29 03:15:30 UTC
Well, you have to compile your project with debug options, otherwise the debugger is missing the information, where to find the respective source files.
The default config for a new qmake application is "release". If I switch to "debug" in the configuration of the src project and rebuild, the debugger  finds the source files.

If your project is properly configured as debug, and you still experience this problem, I need more information about your project settings to reproduce it.
Otherwise I'm going to close this bug.
Comment 5 Jens Dagerbo 2003-10-29 13:26:01 UTC
Yup, you're right. (So sue me, I'd never used the qmake project before.. ;) )

Close away, it works fine. :)

I think it worth considering to have "debug" be the default option for new projects though. There is rarely a reason to develop in release mode.
Comment 6 Amilcar do Carmo Lucas 2003-11-01 19:21:00 UTC
closing this one as invalib because it isn't a bug. It's a user error :)