View mode: basic / threaded / horizontal-split · Log in · Help
December 06, 2005
Re: WinDbg can't see D variables?
Ben Hinkle wrote:
> 
> The DMC CD is nifty and has lots of small command-line goodies like a 
> disassembler and such (I think...). I don't remember the exact WinDbg 
> version on there but it tends to crash alot and I only use it when I want to 
> see some variables - it feels like it's written for Windows 3.1 or 
> something.

I've already got the EUP and so have those nifty tools.  DMC itself is 
quite nice, but I'd only be able to use it for hobby work, and all my 
hobby work is in D these days.  Still, I do like all the language 
extensions it contains.

> As for VC 6 - it's what I use all the time for C/C++ stuff at home. Now that 
> I think about it I don't remember having success using it to debug dmd files 
> but I don't remember trying very hard. 

The process outlined on the Wiki seems quite awkward.  If it were simply 
a matter of running the app and pointing it at the involved 
object/source files I'd probably give it a shot, but it seems a bit more 
involved than that.  I suppose I should look at DBug and see if that's 
sufficient.  My requirements are really pretty minimal--I want to be 
able to step through code, examine variables, and perhaps trap access 
violations.  Oh, and it shouldn't crash :-)  VC6 used to drive me crazy 
because it crashed constantly while debugging.  I'm happy to be well rid 
of that IDE (though VC8 is an absolute dog on my laptop--I think they 
must have rewritten it in LOGO or something).


Sean
December 06, 2005
Re: WinDbg can't see D variables?
I use MSVC6 all the time for debugging D. In fact, I rarely run things from 
the command-line.

Getting it to debug D is trivial: create an empty workspace/project, and 
point the debug-settings at an executable compiled with -g. I've now 
forgotton how to point it at the source files, but that was straightforward 
also. I recall it asked me once when it couldn't find them, and then never 
asked again.

Haven't had it crash on me once, in almost two years. Knock knock. Better 
luck than Sean, I guess :-)

MSVC6 can see much of the native D types, though arrays are 64bit integers. 
char* shows content just fine. Classes, naturally, do not expand. 
Regardless, it's very usable. StepInto works for nearly everything, though I 
sometimes have to drop into assembler to trace though, for example, a call 
via an interface. Option -O does confuse the display of variable contents 
terribly, so use that only for examining codegen.

Stepping into templates is a known problem, though that bug can be worked 
around by declaring an alias for the template "within the template module", 
and referencing that instead of using Foo!(x) statements at the call site. 
Would be nice if Walter could fix that annoyance.

It also catches exceptions and so forth. I really can't imagine doing 
serious development in D without it, which just goes to show how quickly one 
becomes a softy.

- Kris


"Sean Kelly" <sean@f4.ca> wrote in message 
news:dn515s$2d44$1@digitaldaemon.com...
> Ben Hinkle wrote:
>>
>> The DMC CD is nifty and has lots of small command-line goodies like a 
>> disassembler and such (I think...). I don't remember the exact WinDbg 
>> version on there but it tends to crash alot and I only use it when I want 
>> to see some variables - it feels like it's written for Windows 3.1 or 
>> something.
>
> I've already got the EUP and so have those nifty tools.  DMC itself is 
> quite nice, but I'd only be able to use it for hobby work, and all my 
> hobby work is in D these days.  Still, I do like all the language 
> extensions it contains.
>
>> As for VC 6 - it's what I use all the time for C/C++ stuff at home. Now 
>> that I think about it I don't remember having success using it to debug 
>> dmd files but I don't remember trying very hard.
>
> The process outlined on the Wiki seems quite awkward.  If it were simply a 
> matter of running the app and pointing it at the involved object/source 
> files I'd probably give it a shot, but it seems a bit more involved than 
> that.  I suppose I should look at DBug and see if that's sufficient.  My 
> requirements are really pretty minimal--I want to be able to step through 
> code, examine variables, and perhaps trap access violations.  Oh, and it 
> shouldn't crash :-)  VC6 used to drive me crazy because it crashed 
> constantly while debugging.  I'm happy to be well rid of that IDE (though 
> VC8 is an absolute dog on my laptop--I think they must have rewritten it 
> in LOGO or something).
>
>
> Sean
December 07, 2005
Re: WinDbg can't see D variables?
"Hasan Aljudy" <hasan.aljudy@gmail.com> wrote in message
news:dn4rp1$1vnu$1@digitaldaemon.com...
> But I think MSVC uses windbg (or cdb) internally.
> It must be like what Sean said, the older versions of windbg can see D's
> variables!

Sean is right. You can get the older windbg.exe as part of the Digital Mars
CD. That version is 08/08/96.
December 07, 2005
Re: WinDbg can't see D variables?
Walter Bright wrote:
> "Hasan Aljudy" <hasan.aljudy@gmail.com> wrote in message
> news:dn4rp1$1vnu$1@digitaldaemon.com...
> 
>>But I think MSVC uses windbg (or cdb) internally.
>>It must be like what Sean said, the older versions of windbg can see D's
>>variables!
> 
> 
> Sean is right. You can get the older windbg.exe as part of the Digital Mars
> CD. That version is 08/08/96.
> 
> 
> 

hmm .. I found this on google:
http://upload.mg34.vc-graz.ac.at/zid/10.0.0.2/microsoft/ntsp3us.wks/

>  windbg.exe              01-May-1997 02:00   561k 

the date indicated 1997, but when I try to run it and check the "about" 
dialoge, it says windows xp SP2 :/
December 08, 2005
Re: WinDbg can't see D variables?
Jon L wrote:
> I am trying to get WinDbg to work with D on WinXP - and so far, I can get WinDbg
> to track the current line in the source - but I can't get WinDbg to see any
> variables.  All it seems to see are functions.  Is there some way to get WinDbg
> to see D variables?
> 
> 

As the others have said, we need a somewhat older version,

I had success seeing variables using the windbg here:
http://www.cs.nmt.edu/~cs221/jbpub/Detmer/Software/

(I downloaded it using the DownThemAll firefox extension!)

BUT, it showed the hexadecimal values of the variables!
I was able to make it show the decimal values by going 
options->debugger->Radix and choose the "decimal" radio button.

(this was a result of googling: intitle:index.of "windbg.exe")
December 10, 2005
Re: WinDbg can't see D variables?
"Hasan Aljudy" <hasan.aljudy@gmail.com> wrote in message
news:dn7j02$2c0p$1@digitaldaemon.com...
> Walter Bright wrote:
> > Sean is right. You can get the older windbg.exe as part of the Digital
Mars
> > CD. That version is 08/08/96.
> >
> >
> >
>
> hmm .. I found this on google:
> http://upload.mg34.vc-graz.ac.at/zid/10.0.0.2/microsoft/ntsp3us.wks/
>
> >  windbg.exe              01-May-1997 02:00   561k
>
> the date indicated 1997, but when I try to run it and check the "about"
> dialoge, it says windows xp SP2 :/

I know, mine does the same thing. Weird.
December 10, 2005
Re: WinDbg can't see D variables?
On Sat, 10 Dec 2005 01:58:57 -0500, Walter Bright  
<newshound@digitalmars.com> wrote:

>> the date indicated 1997, but when I try to run it and check the "about"
>> dialoge, it says windows xp SP2 :/
>
> I know, mine does the same thing. Weird.
>

ShellAbout() always shows the running Windows version,
   http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shellabout.asp
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home