Version: 3.0.0a5 (using KDE 3.1.3) Installed from: SuSE Compiler: gcc version 3.3 20030226 (prerelease) (SuSE Linux) OS: Linux (i686) release 2.4.21-64-default in my projects there 2 files with absolutely the same name residing in different subprojects (say, lib1/data.cpp and lib2/data.cpp ). And regardless of in which of them i set a breakpoint within the Kdevelop IDE, gdb then always thinks as i set the breakpoint in the first one. (build of 30/08)
Very odd. The breakpoints are set with the full path name (or they used to be). What does the GDB window say when it tries to set a breakpoint?
Subject: Re: breakpoint do not work if there are 2 files with the same name project is Automake-based C++, imported from pre-existing automake/autoconf files. i set a break point in my lib2/data.cpp, and when i start debugging, the GDB prints the following: (gdb) break data.cpp:541 No line 541 in file "data.cpp" remark: the file lib1/data.cpp has only 155 lines actually -- i could not find a way to reffer to lib1/data.cpp in gdb command line -- my temprorary workaround is to set breakpoints on the method calls (it is easy to do in ddd, since it has command-line-auto-completion :-), but its source browser does not display subdirs -- i have only one data.cpp there :-) ) note: my project does not have src directory, like new automake-based project creates, and all the necesary automake stuff was created using simply 'automake -a -c' and 'libtoolize -c' -- i.e. not what new automake-based project offers. the project directory tree looks like the following ./ -- only auto* stuff, kdevelop project file and makefiles ./lib1 -- contains sources of lib1.a ./lib2 -- contains sources of lib2.a ./lib2/sublib1 -- contains sources of libsublib1.a ./progname -- contatins sources of progname binary, plus it links with .a libs listed above. and, my gdb is version 5.3, my linux is SuSE 8.2 On Monday 08 September 2003 01:33, you wrote: > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > > http://bugs.kde.org/show_bug.cgi?id=63883 > > > > > ------- Additional Comments From jbb@kdevelop.org 2003-09-08 08:33 ------- > Very odd. The breakpoints are set with the full path name (or they used to > be). What does the GDB window say when it tries to set a breakpoint? > __________ > IP -
Has anyone been able to reproduce this bug?
This may not be relevant - but kdevelop or gdb doesn't deal properly with mixedcase filenames. If you set a breakpoint on line 13 of HelloWorld.cpp - the breakpoint will be missed and you will get: (gdb) break HelloWorld.cpp:13 No source file named HelloWorld.cpp. if you change the breakpoint in the "breakpoints" window from HelloWorld.cpp to helloworld.cpp the breakpoint will get hit but you won't see the source code line highlight (because that is in HelloWorld.cpp). kdevelop:3.1.1 gdb: 6.1post-1.20040607.43rh
I do not see anything about this on the change log. So it's probably still valid in HEAD
Amilcar, That's assuming it was ever valid.. can anyone reproduce it?
I still can reproduce it on kDevelop 3.1.2 in SuSE 9.1 make a project with 2 subdirs something like this: /dir1 test.cpp /dir2 test.cpp /src main.cpp all files linked into a single executable. make a content something like this: dir1/test.cpp : #include <stdio.h> int Test1(){ return printf("TEST1 called\n"); } dir2/test.cpp : #include <stdio.h> int Test2(){ return printf("TEST2 called\n"); } make sure that linenumber of return satement is the same in both files !!! src/main.cpp : #include <stdio.h> int Test1(); int Test2(); int main() { printf("calling test1:..."); Test1(); printf("calling test2:..."); Test2(); return 0; } now compile and run it. then set the breakpoint upon the return statement in dir1/test.cpp run and see the results. now set the breakpoint upon the return statement in dir2/test.cpp run and compare. in my case the result was the same: in both cases it stopped in the dir1/test.cpp. In DDD it works just as it should. sorry guys, i dont have possibility to test it in HEAD right now.
I cheked it in KDevelop 3.2 beta 2 which comes with SuSE 9.1 packages of KDE 3.2beta2 and the bug is still there On Tuesday 08 February 2005 16:52, shift@newmail.ru wrote: > ------- You are receiving this mail because: ------- > You reported the bug, or are watching the reporter. > > http://bugs.kde.org/show_bug.cgi?id=63883 > > > > > ------- Additional Comments From shift newmail ru 2005-02-08 14:52 > ------- I still can reproduce it on kDevelop 3.1.2 in SuSE 9.1 > > make a project with 2 subdirs something like this: > > > /dir1 > test.cpp > /dir2 > test.cpp > /src > main.cpp > > all files linked into a single executable. > > make a content something like this: > > > dir1/test.cpp : > #include <stdio.h> > int Test1(){ > return printf("TEST1 called\n"); > } > dir2/test.cpp : > #include <stdio.h> > int Test2(){ > return printf("TEST2 called\n"); > } > > > make sure that linenumber of return satement is the same in both files > !!! > > > src/main.cpp : > #include <stdio.h> > int Test1(); > int Test2(); > int main() { > printf("calling test1:..."); > Test1(); > printf("calling test2:..."); > Test2(); > return 0; > } > > > now compile and run it. > then set the breakpoint upon the return statement in dir1/test.cpp > run and see the results. > now set the breakpoint upon the return statement in dir2/test.cpp > run and compare. > > in my case the result was the same: in both cases it stopped in the > dir1/test.cpp. In DDD it works just as it should. > > sorry guys, i dont have possibility to test it in HEAD right now.
Fixed by this commit: r431114 | amantia | 2005-07-03 14:07:29 +0400 (Sun, 03 Jul 2005) | 2 lines