www.digitalmars.com         C & C++   DMDScript  

D - WinDbg tips

reply Brad Anderson <brad sankaty.dot.com> writes:
Would it be possible for one of you guys to post a few quick thoughts on how we 
could use WinDbg to debug our D programs?  Kind of a mini-tutorial.

I've downloaded WinDbg, and compiled a small D program with -g to no avail. 
All 
I can see is some disassembly - nothing like what gdb put out in the NG post on 
1/18/04.  At least we could see the args array there.

Any tips on how to put breakpoints and/or step through code would be
appreciated 
too, or a current state for D debugging.

My executable is much larger with the symbols.  Here's what I am getting:

CommandLine: D:\dev\D\PanaETL\parsefiles.exe c:\etl\idq\work
Symbol search path is: *** Invalid ***
****************************************************************************
* Symbol loading may be unreliable without a symbol search path.           *
* Use .symfix to have the debugger choose a symbol path.                   *
* After setting your symbol path, use .reload to refresh symbol locations. *
****************************************************************************
Executable search path is:
ModLoad: 00400000 00430000   image00400000
ModLoad: 77f50000 77ff7000   ntdll.dll
ModLoad: 77e60000 77f46000   C:\WINDOWS\system32\kernel32.dll
ModLoad: 77d40000 77dcc000   C:\WINDOWS\system32\USER32.DLL
ModLoad: 77c70000 77cb0000   C:\WINDOWS\system32\GDI32.dll
ModLoad: 77dd0000 77e5d000   C:\WINDOWS\system32\ADVAPI32.dll
ModLoad: 78000000 78086000   C:\WINDOWS\system32\RPCRT4.dll
(9d4.8a0): Break instruction exception - code 80000003 (first chance)
eax=00241eb4 ebx=7ffdf000 ecx=00000000 edx=77f51301 esi=00241eb4 edi=00241f48
eip=77f75a58 esp=0012fb38 ebp=0012fc2c iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for 
ntdll.dll -
ntdll!DbgBreakPoint:
77f75a58 cc               int     3


Thanks in advance,
BA
Jan 22 2004
next sibling parent "Walter" <walter digitalmars.com> writes:
Make sure the link happens with /co.

"Brad Anderson" <brad sankaty.dot.com> wrote in message
news:buq9rs$1k6a$1 digitaldaemon.com...
 Would it be possible for one of you guys to post a few quick thoughts on
how we
 could use WinDbg to debug our D programs?  Kind of a mini-tutorial.

 I've downloaded WinDbg, and compiled a small D program with -g to no
avail. All
 I can see is some disassembly - nothing like what gdb put out in the NG
post on
 1/18/04.  At least we could see the args array there.

 Any tips on how to put breakpoints and/or step through code would be
appreciated
 too, or a current state for D debugging.

 My executable is much larger with the symbols.  Here's what I am getting:

 CommandLine: D:\dev\D\PanaETL\parsefiles.exe c:\etl\idq\work
 Symbol search path is: *** Invalid ***
****************************************************************************
 * Symbol loading may be unreliable without a symbol search path.
*
 * Use .symfix to have the debugger choose a symbol path.
*
 * After setting your symbol path, use .reload to refresh symbol locations.
*

****************************************************************************
 Executable search path is:
 ModLoad: 00400000 00430000   image00400000
 ModLoad: 77f50000 77ff7000   ntdll.dll
 ModLoad: 77e60000 77f46000   C:\WINDOWS\system32\kernel32.dll
 ModLoad: 77d40000 77dcc000   C:\WINDOWS\system32\USER32.DLL
 ModLoad: 77c70000 77cb0000   C:\WINDOWS\system32\GDI32.dll
 ModLoad: 77dd0000 77e5d000   C:\WINDOWS\system32\ADVAPI32.dll
 ModLoad: 78000000 78086000   C:\WINDOWS\system32\RPCRT4.dll
 (9d4.8a0): Break instruction exception - code 80000003 (first chance)
 eax=00241eb4 ebx=7ffdf000 ecx=00000000 edx=77f51301 esi=00241eb4
edi=00241f48
 eip=77f75a58 esp=0012fb38 ebp=0012fc2c iopl=0         nv up ei pl nz na pe
nc
 cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000
efl=00000202
 *** ERROR: Symbol file could not be found.  Defaulted to export symbols
for
 ntdll.dll -
 ntdll!DbgBreakPoint:
 77f75a58 cc               int     3


 Thanks in advance,
 BA
Jan 23 2004
prev sibling parent reply "C" <dont respond.com> writes:
I tutorial on how to use this with D would be invaluable , especialy to
those of us new at asm.

C

"Brad Anderson" <brad sankaty.dot.com> wrote in message
news:buq9rs$1k6a$1 digitaldaemon.com...
 Would it be possible for one of you guys to post a few quick thoughts on
how we
 could use WinDbg to debug our D programs?  Kind of a mini-tutorial.

 I've downloaded WinDbg, and compiled a small D program with -g to no
avail. All
 I can see is some disassembly - nothing like what gdb put out in the NG
post on
 1/18/04.  At least we could see the args array there.

 Any tips on how to put breakpoints and/or step through code would be
appreciated
 too, or a current state for D debugging.

 My executable is much larger with the symbols.  Here's what I am getting:

 CommandLine: D:\dev\D\PanaETL\parsefiles.exe c:\etl\idq\work
 Symbol search path is: *** Invalid ***
****************************************************************************
 * Symbol loading may be unreliable without a symbol search path.
*
 * Use .symfix to have the debugger choose a symbol path.
*
 * After setting your symbol path, use .reload to refresh symbol locations.
*

****************************************************************************
 Executable search path is:
 ModLoad: 00400000 00430000   image00400000
 ModLoad: 77f50000 77ff7000   ntdll.dll
 ModLoad: 77e60000 77f46000   C:\WINDOWS\system32\kernel32.dll
 ModLoad: 77d40000 77dcc000   C:\WINDOWS\system32\USER32.DLL
 ModLoad: 77c70000 77cb0000   C:\WINDOWS\system32\GDI32.dll
 ModLoad: 77dd0000 77e5d000   C:\WINDOWS\system32\ADVAPI32.dll
 ModLoad: 78000000 78086000   C:\WINDOWS\system32\RPCRT4.dll
 (9d4.8a0): Break instruction exception - code 80000003 (first chance)
 eax=00241eb4 ebx=7ffdf000 ecx=00000000 edx=77f51301 esi=00241eb4
edi=00241f48
 eip=77f75a58 esp=0012fb38 ebp=0012fc2c iopl=0         nv up ei pl nz na pe
nc
 cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000
efl=00000202
 *** ERROR: Symbol file could not be found.  Defaulted to export symbols
for
 ntdll.dll -
 ntdll!DbgBreakPoint:
 77f75a58 cc               int     3


 Thanks in advance,
 BA
Jan 27 2004
parent "Matthew" <matthew.hat stlsoft.dot.org> writes:
And everyone else as well. It's a long time since I've used WinDbg, and I've
still got no idea how the D source works with debuggers.

"C" <dont respond.com> wrote in message
news:bv7igg$1sfo$1 digitaldaemon.com...
 I tutorial on how to use this with D would be invaluable , especialy to
 those of us new at asm.

 C

 "Brad Anderson" <brad sankaty.dot.com> wrote in message
 news:buq9rs$1k6a$1 digitaldaemon.com...
 Would it be possible for one of you guys to post a few quick thoughts on
how we
 could use WinDbg to debug our D programs?  Kind of a mini-tutorial.

 I've downloaded WinDbg, and compiled a small D program with -g to no
avail. All
 I can see is some disassembly - nothing like what gdb put out in the NG
post on
 1/18/04.  At least we could see the args array there.

 Any tips on how to put breakpoints and/or step through code would be
appreciated
 too, or a current state for D debugging.

 My executable is much larger with the symbols.  Here's what I am
getting:
 CommandLine: D:\dev\D\PanaETL\parsefiles.exe c:\etl\idq\work
 Symbol search path is: *** Invalid ***
****************************************************************************
 * Symbol loading may be unreliable without a symbol search path.
*
 * Use .symfix to have the debugger choose a symbol path.
*
 * After setting your symbol path, use .reload to refresh symbol
locations.
 *

****************************************************************************
 Executable search path is:
 ModLoad: 00400000 00430000   image00400000
 ModLoad: 77f50000 77ff7000   ntdll.dll
 ModLoad: 77e60000 77f46000   C:\WINDOWS\system32\kernel32.dll
 ModLoad: 77d40000 77dcc000   C:\WINDOWS\system32\USER32.DLL
 ModLoad: 77c70000 77cb0000   C:\WINDOWS\system32\GDI32.dll
 ModLoad: 77dd0000 77e5d000   C:\WINDOWS\system32\ADVAPI32.dll
 ModLoad: 78000000 78086000   C:\WINDOWS\system32\RPCRT4.dll
 (9d4.8a0): Break instruction exception - code 80000003 (first chance)
 eax=00241eb4 ebx=7ffdf000 ecx=00000000 edx=77f51301 esi=00241eb4
edi=00241f48
 eip=77f75a58 esp=0012fb38 ebp=0012fc2c iopl=0         nv up ei pl nz na
pe
 nc
 cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000
efl=00000202
 *** ERROR: Symbol file could not be found.  Defaulted to export symbols
for
 ntdll.dll -
 ntdll!DbgBreakPoint:
 77f75a58 cc               int     3


 Thanks in advance,
 BA
Jan 27 2004