public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* setting a breakpoint on a dll, relative path or absolute path issue
@ 2011-06-11  7:49 asmwarrior
  2011-06-11 17:56 ` Keith Seitz
       [not found] ` <4DF37ADA.3070905@users.sourceforge.net>
  0 siblings, 2 replies; 16+ messages in thread
From: asmwarrior @ 2011-06-11  7:49 UTC (permalink / raw)
  To: gdb, MinGW Users List

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-06-14  5:27 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-11  7:49 setting a breakpoint on a dll, relative path or absolute path issue asmwarrior
2011-06-11 17:56 ` Keith Seitz
2011-06-12  3:56   ` asmwarrior
2011-06-12  7:45     ` asmwarrior
2011-06-12  7:56       ` Jan Kratochvil
2011-06-12  8:06         ` asmwarrior
2011-06-12 16:22           ` [Mingw-users] " Earnie
2011-06-12 16:51         ` Eli Zaretskii
2011-06-12 16:54           ` Jan Kratochvil
     [not found] ` <4DF37ADA.3070905@users.sourceforge.net>
2011-06-12  8:15   ` asmwarrior
     [not found]   ` <4DF4513A.3090902__7466.60719528354$1307866544$gmane$org@gmail.com>
2011-06-13  6:33     ` Asm warrior
2011-06-13 17:02       ` Eli Zaretskii
2011-06-14  3:14         ` Asm warrior
2011-06-14  3:49           ` Asm warrior
2011-06-14  4:22             ` Jeffrey Walton
2011-06-14  5:27         ` setting a breakpoint on a dll, relative path or absolute path issue[solved with a patch] asmwarrior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).