www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Windgb debug a dll

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!
Nov 26 2012