Bug 66765 - gdb can't find source files when debuging qmake projets
Summary: gdb can't find source files when debuging qmake projets
Status: RESOLVED NOT A BUG
Alias: None
Product: kdevelop
Classification: Applications
Component: CPP Debugger (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KDevelop Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-28 14:05 UTC by tal
Modified: 2003-11-01 19:21 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 :)