digitalmars.D.learn - Code Listing?
- John (5/5) Nov 11 2006 Hello
- Lars Ivar Igesund (8/15) Nov 11 2006 Not sure what you mean, but if you turn on -cov (for coverage), you shou...
- John (3/3) Nov 11 2006 Lars,
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (3/4) Nov 11 2006 gdc -S, or use "obj2asm" with DMD objects.
- John (5/5) Nov 11 2006 Thanks anders
- Jarrett Billingsley (4/9) Nov 11 2006 Because DMD doesn't compile to assembly which is then assembled by anoth...
- John (13/24) Nov 11 2006 apply
- Jarrett Billingsley (13/21) Nov 11 2006 Then ask for Walter to add it to DMD. There's no reason why it doesn't ...
- Don Clugston (3/31) Nov 13 2006 The Open Watcom compiler tools work with DMD.
Hello I'm just experimenting (playing) with the D language, and i wonder if there is a compile option that enables code listing?? Thanks John
Nov 11 2006
John wrote:Hello I'm just experimenting (playing) with the D language, and i wonder if there is a compile option that enables code listing?? Thanks JohnNot sure what you mean, but if you turn on -cov (for coverage), you should be able to get a listing showing how many times a given statement is executed. -- Lars Ivar Igesund blog at http://larsivi.net DSource & #D: larsivi
Nov 11 2006
Lars, I mean generated assembly coed listing. John
Nov 11 2006
John wrote:I mean generated assembly coed listing.gdc -S, or use "obj2asm" with DMD objects. --anders
Nov 11 2006
Thanks anders I thought there would be a feature that enables listing parts of the code, not the whole obj file (a pragma for example that I can apply to a block of code).. Why there is no such feature?
Nov 11 2006
"John" <johnkirollos yahoo.com> wrote in message news:ej4n67$11ih$1 digitaldaemon.com...Thanks anders I thought there would be a feature that enables listing parts of the code, not the whole obj file (a pragma for example that I can apply to a block of code).. Why there is no such feature?Because DMD doesn't compile to assembly which is then assembled by another assembler?
Nov 11 2006
== Quote from Jarrett Billingsley (kb3ctd2 yahoo.com)'s article"John" <johnkirollos yahoo.com> wrote in message news:ej4n67$11ih$1 digitaldaemon.com...theThanks anders I thought there would be a feature that enables listing parts ofapplycode, not the whole obj file (a pragma for example that I cananotherto a block of code).. Why there is no such feature?Because DMD doesn't compile to assembly which is then assembled byassembler?Jarrett, C++ for example can generated asm code listing. It's useful in debugging, code optimization, and for me, it's interesting in learning the language by seeing how the compiler generates the code. There is nothing that prevents D from having such feature, as it generates directly executable code and does not rely on a VM. anders, obj2asm coming with DMD is a Linux executable? What about a windows equivalent?
Nov 11 2006
"John" <johnkirollos yahoo.com> wrote in message news:ej5jsm$1r9l$1 digitaldaemon.com...Jarrett, C++ for example can generated asm code listing. It's useful in debugging, code optimization, and for me, it's interesting in learning the language by seeing how the compiler generates the code. There is nothing that prevents D from having such feature, as it generates directly executable code and does not rely on a VM.Then ask for Walter to add it to DMD. There's no reason why it doesn't have it other than he didn't think about it, or he didn't think it necessary.obj2asm coming with DMD is a Linux executable? What about a windows equivalent?Man, it would be nice. But the Windows version of obj2asm is available from Digital Mars as well -- in the $15 extended utilities package. I'm not entirely sure why Walter distributes the Linux version for free. As far as disassembling the individual object files, you'd probably have luck using Borland tools to do so, as DMD uses the OMF object format. But for fully compiled EXEs or DLLs, you can try the Microsoft DUMPOBJ utility, if you can get your hands on it. It works well. Failing all of that, you can use a debugger to step through your program and look at the assembly listing on the fly. It's not all at once, but hey.
Nov 11 2006
Jarrett Billingsley wrote:"John" <johnkirollos yahoo.com> wrote in message news:ej5jsm$1r9l$1 digitaldaemon.com...The Open Watcom compiler tools work with DMD. Also DDL is becoming a good alternative to DUMPOBJ.Jarrett, C++ for example can generated asm code listing. It's useful in debugging, code optimization, and for me, it's interesting in learning the language by seeing how the compiler generates the code. There is nothing that prevents D from having such feature, as it generates directly executable code and does not rely on a VM.Then ask for Walter to add it to DMD. There's no reason why it doesn't have it other than he didn't think about it, or he didn't think it necessary.obj2asm coming with DMD is a Linux executable? What about a windows equivalent?Man, it would be nice. But the Windows version of obj2asm is available from Digital Mars as well -- in the $15 extended utilities package. I'm not entirely sure why Walter distributes the Linux version for free. As far as disassembling the individual object files, you'd probably have luck using Borland tools to do so, as DMD uses the OMF object format. But for fully compiled EXEs or DLLs, you can try the Microsoft DUMPOBJ utility, if you can get your hands on it. It works well. Failing all of that, you can use a debugger to step through your program and look at the assembly listing on the fly. It's not all at once, but hey.
Nov 13 2006