From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25512 invoked by alias); 11 Jun 2011 07:49:54 -0000 Received: (qmail 25504 invoked by uid 22791); 11 Jun 2011 07:49:52 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_DB X-Spam-Check-By: sourceware.org Received: from mail-pv0-f169.google.com (HELO mail-pv0-f169.google.com) (74.125.83.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 11 Jun 2011 07:49:38 +0000 Received: by pvc12 with SMTP id 12so1847631pvc.0 for ; Sat, 11 Jun 2011 00:49:37 -0700 (PDT) Received: by 10.142.215.19 with SMTP id n19mr479632wfg.265.1307778577681; Sat, 11 Jun 2011 00:49:37 -0700 (PDT) Received: from [192.168.1.100] ([60.186.237.218]) by mx.google.com with ESMTPS id x8sm3679877wfx.19.2011.06.11.00.49.31 (version=SSLv3 cipher=OTHER); Sat, 11 Jun 2011 00:49:36 -0700 (PDT) Message-ID: <4DF31EB0.6080006@gmail.com> Date: Sat, 11 Jun 2011 07:49:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: gdb@sourceware.org, MinGW Users List Subject: setting a breakpoint on a dll, relative path or absolute path issue Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-06/txt/msg00074.txt.bz2 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