www.digitalmars.com         C & C++   DMDScript  

D - debuggers

reply "Joe Battelle" <b-a-t-t-e-l-l-e mail.com> writes:
I built Phobos with symbols and tried WinDbg on the Voxel demo.  I was able
to step through the D source code (after setting up the source path
correctly.)  However "step over"  switches from the D source over to the
disassembly window and then starts stepping one instruction at a time before
it eventually steps back to the source.  If the D source line is "simple"
enough, it will step without transitioning to the disassembly pane.
Function labels seem to be picked out fine, but the data references seemed
to be uninformative.  Nothing in the locals pane.

Is this state of the art for D debugging or should it be working better for
me?  (The only info I could find on this was in the FAQ:  "Debug D programs
with common, existing C debuggers")

I noticed in the DM C++ info, the debugger on CD works one statement at a
time (as opposed to one line).  Does this debugger work any better with D?
Aug 11 2002
parent reply Juarez Rudsatz <juarez nowhere.com> writes:
"Joe Battelle" <b-a-t-t-e-l-l-e mail.com> wrote in
news:aj7g4a$9os$1 digitaldaemon.com: 

 I built Phobos with symbols and tried WinDbg on the Voxel demo.
How have you created the .pdb files ? I have searched for information but found none.
Aug 12 2002
parent reply "Joe Battelle" <b-a-t-t-e-l-l-e mail.com> writes:
WinDbg can use the symbols bound into the .EXE file directly.  How well it
does this is an open question.  I am sure there is a tool somewhere that can
strip .EXEs and create .PDBs but I'm not sure it is necessary or would do
any good.  Other insights into this would be appreciated.

"Juarez Rudsatz" <juarez nowhere.com> wrote in message
news:Xns9268C3B74FF83juarezcom 63.105.9.61...
 "Joe Battelle" <b-a-t-t-e-l-l-e mail.com> wrote in
 news:aj7g4a$9os$1 digitaldaemon.com:

 I built Phobos with symbols and tried WinDbg on the Voxel demo.
How have you created the .pdb files ? I have searched for information but found none.
Aug 12 2002
parent reply Juarez Rudsatz <juarez nowhere.com> writes:
"Joe Battelle" <b-a-t-t-e-l-l-e mail.com> wrote in
news:aj9g9t$2iih$1 digitaldaemon.com: 

 WinDbg can use the symbols bound into the .EXE file directly.  How
 well it does this is an open question. 
I have tried compile with symbols but could not debug in source mode in WinDbg. How is the process of making this ?
Aug 13 2002
parent reply "Joe Battelle" <b-a-t-t-e-l-l-e mail.com> writes:
 I have tried compile with symbols but could not debug in source mode in
 WinDbg. How is the process of making this ?
Just make sure that both the individual objects and the linked executable are done with the -g switch. DMD will mutate the -g into a /CO switch for the linker that is supposed to include full CodeView debugging information. In order to work with WinDbg you just set the Source Includes... path to point to your Phobos and App source directories. Then open the .EXE in WinDbg. Open a .D source file and set a breakpoint and go. Voila. Well sortof. My original post was about the fact that this sorta works and sorta doesn't. I'm still waiting for more info on the state of the current DMD implementation wrt debugger support.
Aug 13 2002
parent reply "Walter" <walter digitalmars.com> writes:
"Joe Battelle" <b-a-t-t-e-l-l-e mail.com> wrote in message
news:ajbrln$1uur$1 digitaldaemon.com...
 I'm still waiting for more info on the state of the current DMD
 implementation wrt debugger support.
This could probably use more work. -Walter
Aug 14 2002
parent Joe Battelle <Joe_member pathlink.com> writes:
This could probably use more work. -Walter
Thanks for your reply. I would humbly recommend that you mention somewhere in your release notes that debugging support is broken or at least nor expected to entirely work. Also, while Design By Contract may save you from resorting to a debugger as often as you might otherwise, I think it is important for the beta release. If there is anything that makes sense to be done as a WinDbg extension I'd be happy to do it. Joe
Aug 15 2002