|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.debugger - [ddbg] Debuggin DLL with Code::Blocks
I am trying to debug a DLL with the latest release of DDBG (0.11.3) using CodeBlocks 8.02 release. CodeBlocks does not allow you to directly debug a DLL so I select a host exe and set my breakpoints. The Debugger log window however shows errors on trying to set the breakpoints in the DLL's. The DLL's are loaded and the path to the sourcecode is added to the debugger but it DDBG complains that it cannot find the source file. Has anyone successfully debugged a DLL with CodeBlocks? Is there some additional setup I need to do in order to get this to work? Any help is much appreciated. Log is below. Command-line: C:\DMCompilers\Debugger\ddbg_gdb.bat -nx -fullname -quiet -args ../../_bin/saWorkspace.exe Working dir : C:\SoftAutomationD\0_Workspace\saWorkspace\set prompt >>>>>>cb_gdb: Mar 11 2008
the debug info in the executable usually hold the source filenames as relative paths just like they were used during compilation. in order for the debugger to find the files, it needs to reconstruct the absolute paths using the search paths that are set with the directory command (or 'sp' when in ddbg command line mode). so my guess is that you are missing a directory for the search path. you can find out what the source files are called in the debug info by using ddbg from the command line. the following commands should do that for your project: cd C:\SoftAutomationD\0_Workspace\saWorkspace\ ddbg ..\..\_bin\saWorkspace.exe lsm if that lists too much, you can try lsm Variant instead. you might get something like saCollections/Variant.d in which case you'd need to add C:/SoftAutomationD/0_Base/ to the search paths. Matthew Allen wrote:I am trying to debug a DLL with the latest release of DDBG (0.11.3) using CodeBlocks 8.02 release. CodeBlocks does not allow you to directly debug a DLL so I select a host exe and set my breakpoints. The Debugger log window however shows errors on trying to set the breakpoints in the DLL's. The DLL's are loaded and the path to the sourcecode is added to the debugger but it DDBG complains that it cannot find the source file. Has anyone successfully debugged a DLL with CodeBlocks? Is there some additional setup I need to do in order to get this to work? Any help is much appreciated. Log is below. Command-line: C:\DMCompilers\Debugger\ddbg_gdb.bat -nx -fullname -quiet -args ../../_bin/saWorkspace.exe Working dir : C:\SoftAutomationD\0_Workspace\saWorkspace\set prompt >>>>>>cb_gdb: Mar 12 2008
Sorry to be a pain. I am linking my DLL to the exe statically. The variant.d file is in the DLL sourcecode. When I load the symbols from saWorkspace.exe it does not know about variant at that point. CodeBlocks sets the breakpoints before running and so the symbols for the saCollections.dll have not been loaded before the breakpoint is set. Am I doing something wrong. Sorry for my ignorance. I have tried looking at the command line for ddbg and gdb to see if I can add the DLL on the command line so it get's loaded right away. Is this possible? I did not see an option for that. Thanks for your help. Jascha Wetzel Wrote:the debug info in the executable usually hold the source filenames as relative paths just like they were used during compilation. in order for the debugger to find the files, it needs to reconstruct the absolute paths using the search paths that are set with the directory command (or 'sp' when in ddbg command line mode). so my guess is that you are missing a directory for the search path. you can find out what the source files are called in the debug info by using ddbg from the command line. the following commands should do that for your project: cd C:\SoftAutomationD\0_Workspace\saWorkspace\ ddbg ..\..\_bin\saWorkspace.exe lsm if that lists too much, you can try lsm Variant instead. you might get something like saCollections/Variant.d in which case you'd need to add C:/SoftAutomationD/0_Base/ to the search paths. Matthew Allen wrote:I am trying to debug a DLL with the latest release of DDBG (0.11.3) using CodeBlocks 8.02 release. CodeBlocks does not allow you to directly debug a DLL so I select a host exe and set my breakpoints. The Debugger log window however shows errors on trying to set the breakpoints in the DLL's. The DLL's are loaded and the path to the sourcecode is added to the debugger but it DDBG complains that it cannot find the source file. Has anyone successfully debugged a DLL with CodeBlocks? Is there some additional setup I need to do in order to get this to work? Any help is much appreciated. Log is below. Command-line: C:\DMCompilers\Debugger\ddbg_gdb.bat -nx -fullname -quiet -args ../../_bin/saWorkspace.exe Working dir : C:\SoftAutomationD\0_Workspace\saWorkspace\set prompt >>>>>>cb_gdb: Mar 12 2008
Matthew Allen wrote:Sorry to be a pain. I am linking my DLL to the exe statically. The variant.d file is in the DLL sourcecode. When I load the symbols from saWorkspace.exe it does not know about variant at that point. Mar 13 2008
|