Windgb debug a dll

cal callumenator at gmail.com
Mon Nov 26 21:33:17 PST 2012


Trying to debug a D dll, using Windgb.

The dll is built using:
dmd -c -g filename.d
dmd -g filename.obj filename.def

with a def file*. I can load the dll from a D program manually, 
and call functions within it. But I now need to debug some of 
those functions, by stepping into them from the main program.

So: can I do this with Windbg, and step through the source as 
though the dll were an exe? And if so, what info do I need to 
give windbg to let it do that? Are there things I need to add to 
the .def file, or linker switches?

The .def file contains:
LIBRARY mydll
DESCRIPTION 'mydll'
EXETYPE	 NT
CODE PRELOAD DISCARDABLE
DATA PRELOAD MULTIPLE

Thanks!




More information about the Digitalmars-d-learn mailing list