This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

setting a breakpoint on a dll, relative path or absolute path issue


I meet some problems on setting a break point on a shared dll. (I'm using gdb cvs 20110401 mingw32 build version)
The dll is build with relative sources paths, and my main App was build with absolute source paths.


the dll is a debug version of wxWidgets shared library, locates in:
E:\code\cb\wx\wxWidgets-2.8.12\lib\gcc_dll\wxmsw28ud_gcc_custom.dll

Here is the debug log:

--------------------------------------------------------
info sources
Source files for which symbols have been read in:
E:\code\cb\test_code\debug_wx_library\debug_wx_libraryMain.cpp, E:/code/cb/wx/wxWidgets-2.8.12/include/wx/generic/textdlgg.h,
...
e:/code/cb/gcc/mingw_gcc4.5.4.20110428_static_win32/mingw/bin/../lib/gcc/i686-pc-mingw32/4.5.4/include/c++/i686-pc-mingw32/bits/gthr-default.h,


E:\code\cb\wx\wxWidgets-2.8.12\build\msw/../../include/wx/filefn.h, E:\code\cb\wx\wxWidgets-2.8.12\build\msw/../../include/wx/filename.h,
...
Source files for which symbols will be read in on demand:


../.././libgcc/../gcc/gthr-win32.h,

...

E:/code/cb/wx/wxWidgets-2.8.12/include/wx/list.h, E:/code/cb/wx/wxWidgets-2.8.12/include/wx/object.h,
...
../../include/wx/vector.h, ../../include/wx/clntdata.h,


...

../../src/richtext/richtextstylepage.cpp,
...

--------------------------------------------------------
Now, I try to set break points on the shared dll's source file:


--------------------------------------------------------
>>>>>>cb_gdb:
> b "../../include/wx/spinbutt.h:20"
Breakpoint 2 at 0x67109942: file ../../include/wx/spinbutt.h, line 40. (3 locations)
>>>>>>cb_gdb:
> b "E:\code\cb\wx\wxWidgets-2.8.12\build\msw/../../src/common/string.cpp:161"
Breakpoint 3 at 0x66d89efd: file ../../src/common/string.cpp, line 161.
>>>>>>cb_gdb:
> b "../../src/common/string.cpp:161"
Breakpoint 4 at 0x66d89efd: file ../../src/common/string.cpp, line 161.
>>>>>>cb_gdb:
> b "E:\code\cb\wx\wxWidgets-2.8.12\src/common/string.cpp:164"
No source file named E:\code\cb\wx\wxWidgets-2.8.12\src/common/string.cpp.
Breakpoint 5 ("E:\code\cb\wx\wxWidgets-2.8.12\src/common/string.cpp:164) pending.
>>>>>>cb_gdb:
> b "../../src/common/datetime.cpp:100"
Breakpoint 6 at 0x66d47ba5: file ../../src/common/datetime.cpp, line 100.
>>>>>>cb_gdb:
> b "E:\code\cb\wx\wxWidgets-2.8.12\build\msw/../../src/common/datetime.cpp:101"
--------------------------------------------------------



The strange thing is:
when I pass a true path "E:\code\cb\wx\wxWidgets-2.8.12\src/common/string.cpp", then the breakpoint failed, gdb report that there is no such source file.


But when using "../../src/common/datetime.cpp" or "E:\code\cb\wx\wxWidgets-2.8.12\build\msw/../../src/common/string.cpp", the breakpoint can be set correctly.

So, can some gdb developers can tell the truth why this would happen?
I think at least when using "E:\code\cb\wx\wxWidgets-2.8.12\src/common/string.cpp", the breakpoint should set correctly.


Can you give me a direction that I can dig into the gdb's source?

thanks.

PS:
The related discussion can be found here:
http://forums.codeblocks.org/index.php/topic,14792.msg99482/topicseen.html#msg99482
and
http://forums.codeblocks.org/index.php/topic,13306.msg89692.html#msg89692

thanks you very much!

asmwarrior
ollydbg from codeblocks' forum


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]