Bug #12211 2007-10-19 08:24
drzymo
Source path for breakpoints not consistent.
I am running Code::Blocks on Windows 2000, with a MinGW based cross-compiler for an Xscale processor. On target gdbserver is running and can be connected to with the windows-based gdb. Debugging an application manually (including setting breakpoints) works perfectly. However, the debugger in Code::Blocks messes up the paths which make setting a breakpoint fail.
What I understand so far is that Code::Blocks passes the absolute path of a source file to the compiler. In my case this means that the file D:\CB_TEST\HelloCPP\main.cpp is send to the compiler. This is also put in the debug information of the executable.
If in gdb the information about the source files is requested then it will return the following:
> info sources
Source files for which symbols have been read in:
Source files for which symbols will be read in on demand:
/root/new-build-final/src/gcc-4.2.1/gcc/config/arm/ieee754-df.S, /root/new-build-final/src/gcc-4.2.1/gcc/config/arm/lib1funcs.asm, D:/armeb-linux-uclibc/lib/gcc/armeb-linux-uclibc/4.2.1/../../../../armeb-linux-uclibc/include/c++/4.2.1/iostream, D:/armeb-linux-uclibc/lib/gcc/armeb-linux-uclibc/4.2.1/../../../../armeb-linux-uclibc/include/c++/4.2.1/bits/locale_facets.tcc, D:/armeb-linux-uclibc/lib/gcc/armeb-linux-uclibc/4.2.1/../../../../armeb-linux-uclibc/include/c++/4.2.1/bits/stl_algobase.h, D:\CB_TEST\HelloCPP\main.cpp
Adding a breakpoint will therefore have to be done with:
> break D:\CB_TEST\HelloCPP\main.cpp:7
Breakpoint 1 at 0x839c: file D:\CB_TEST\HelloCPP\main.cpp, line 7.
However, the absolute path that is used by the Code::Blocks debugger uses the "linux notation", which makes the operation fail:
> break D:/CB_TEST/HelloCPP/main.cpp:7
No source file named D:/CB_TEST/HelloCPP/main.cpp.
I would like to advise that the debugger is uses either:
1) the exact same absolute path that is send to the compiler,
2) the absolute paths obtained with 'info sources'.
- Category
- Debugger
- Group
- Status
- Open
- Close date
- Assigned to
History
Rev. 4584 contains the requested change.
If things don't break for other people, this bug will be closed.
In revision 4592 the fix has been reverted, so this bug is still unsolved.