www.digitalmars.com         C & C++   DMDScript  

D - pdb debug info?

reply "Chris Lajoie" <ctlajoie hotmail.com> writes:
I'm probably just being ignorant, but I can't figure out where the debug
info generated by the -g switch is at.  All I've ever used for debugging
before is pdb files, so if thats not what the D compiler uses, how do I
debug my program?  platform is windows.  Thanks.

Chris
Mar 07 2004
next sibling parent reply imr1984 <imr1984_member pathlink.com> writes:
As far as i know, DMD does not build pdb files. you can still use visual studio
to debug your programs, but it means you want be able to view class member
variables or complicated types. there are some hacks you can use to view a
string for example type this in the watch window:

(char*)(MyString >> 32)

In article <c2g229$209$1 digitaldaemon.com>, Chris Lajoie says...
I'm probably just being ignorant, but I can't figure out where the debug
info generated by the -g switch is at.  All I've ever used for debugging
before is pdb files, so if thats not what the D compiler uses, how do I
debug my program?  platform is windows.  Thanks.

Chris

Mar 08 2004
parent cambarbosa uol.com.br writes:
Hi Chris,

Please, do you know how I can see struct and class field in the watch window of
MSVC debug?

Thanks,

C.A.M.Barbosa

In article <c2ho69$3093$1 digitaldaemon.com>, imr1984 says...
As far as i know, DMD does not build pdb files. you can still use visual studio
to debug your programs, but it means you want be able to view class member
variables or complicated types. there are some hacks you can use to view a
string for example type this in the watch window:

(char*)(MyString >> 32)

In article <c2g229$209$1 digitaldaemon.com>, Chris Lajoie says...
I'm probably just being ignorant, but I can't figure out where the debug
info generated by the -g switch is at.  All I've ever used for debugging
before is pdb files, so if thats not what the D compiler uses, how do I
debug my program?  platform is windows.  Thanks.

Chris


Nov 10 2004
prev sibling parent reply "Walter" <newshound digitalmars.com> writes:
"Chris Lajoie" <ctlajoie hotmail.com> wrote in message
news:c2g229$209$1 digitaldaemon.com...
 I'm probably just being ignorant, but I can't figure out where the debug
 info generated by the -g switch is at.  All I've ever used for debugging
 before is pdb files, so if thats not what the D compiler uses, how do I
 debug my program?  platform is windows.  Thanks.

It generates debug info in Codeview format that is embedded in the .obj files. obj2asm.exe will pretty-print it.
Jul 20 2004
parent reply "Carlos Santander B." <carlos8294 msn.com> writes:
"Walter" <newshound digitalmars.com> escribió en el mensaje
news:cdimou$19m3$1 digitaldaemon.com
| "Chris Lajoie" <ctlajoie hotmail.com> wrote in message
| news:c2g229$209$1 digitaldaemon.com...
|| I'm probably just being ignorant, but I can't figure out where the debug
|| info generated by the -g switch is at.  All I've ever used for debugging
|| before is pdb files, so if thats not what the D compiler uses, how do I
|| debug my program?  platform is windows.  Thanks.
|
| It generates debug info in Codeview format that is embedded in the .obj
| files. obj2asm.exe will pretty-print it.

I think Chris was referring to something different. WinDbg (and Visual
Studio too, I think) use a pdb file to know things about variables. That's
all I know, because when I've tried to get variables in WinDbg it asks for a
pdb file, and since there's none, then I don't get variables in the
debugger.
So the question would be if DMD could generate that pdb file.

-----------------------
Carlos Santander Bernal
Jul 21 2004
parent reply "Walter" <newshound digitalmars.com> writes:
"Carlos Santander B." <carlos8294 msn.com> wrote in message
news:cdnf86$ah9$2 digitaldaemon.com...
 "Walter" <newshound digitalmars.com> escribió en el mensaje
 news:cdimou$19m3$1 digitaldaemon.com
 | "Chris Lajoie" <ctlajoie hotmail.com> wrote in message
 | news:c2g229$209$1 digitaldaemon.com...
 || I'm probably just being ignorant, but I can't figure out where the

 || info generated by the -g switch is at.  All I've ever used for

 || before is pdb files, so if thats not what the D compiler uses, how do I
 || debug my program?  platform is windows.  Thanks.
 |
 | It generates debug info in Codeview format that is embedded in the .obj
 | files. obj2asm.exe will pretty-print it.

 I think Chris was referring to something different. WinDbg (and Visual
 Studio too, I think) use a pdb file to know things about variables. That's
 all I know, because when I've tried to get variables in WinDbg it asks for

 pdb file, and since there's none, then I don't get variables in the
 debugger.
 So the question would be if DMD could generate that pdb file.

The pdb format is, as far as I can tell, a Microsoft trade secret.
Aug 05 2004
parent "Matthew" <admin.hat stlsoft.dot.org> writes:
"Walter" <newshound digitalmars.com> wrote in message
news:ceue4c$2arq$1 digitaldaemon.com...
 "Carlos Santander B." <carlos8294 msn.com> wrote in message
 news:cdnf86$ah9$2 digitaldaemon.com...
 "Walter" <newshound digitalmars.com> escribió en el mensaje
 news:cdimou$19m3$1 digitaldaemon.com
 | "Chris Lajoie" <ctlajoie hotmail.com> wrote in message
 | news:c2g229$209$1 digitaldaemon.com...
 || I'm probably just being ignorant, but I can't figure out where the

 || info generated by the -g switch is at.  All I've ever used for

 || before is pdb files, so if thats not what the D compiler uses, how do I
 || debug my program?  platform is windows.  Thanks.
 |
 | It generates debug info in Codeview format that is embedded in the .obj
 | files. obj2asm.exe will pretty-print it.

 I think Chris was referring to something different. WinDbg (and Visual
 Studio too, I think) use a pdb file to know things about variables. That's
 all I know, because when I've tried to get variables in WinDbg it asks for

 pdb file, and since there's none, then I don't get variables in the
 debugger.
 So the question would be if DMD could generate that pdb file.

The pdb format is, as far as I can tell, a Microsoft trade secret.

There are new libs for working with them, finding symbols, etc. The DIASDK. I was thinking I might write a D wrapping to it sometime, but I guess it's at the end of a *long* list of ToDos. Maybe someone else might have a go?
Aug 05 2004