digitalmars.D.learn - How do I view assembly?
- Sandeep Datta (5/5) May 18 2012 Hi,
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (8/13) May 18 2012 Not with DMD. What you have to do is disassemble the file with objdump
- Sandeep Datta (3/16) May 18 2012 Wow, that was fast! Many thanks Alex Rønne Petersen.
- bearophile (5/7) May 18 2012 I think you refer to "obj2asm", that's not shipped with DMD.
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (9/15) May 18 2012 Hmm, I could've sworn there was a tool for this shipped with the DMD
- Adam D. Ruppe (4/6) May 18 2012 The Linux folder of dmd has obj2asm, but the Windows version
- =?UTF-8?B?QWxleCBSw7hubmUgUGV0ZXJzZW4=?= (6/11) May 18 2012 Well, there's always $INSERT_RANDOM_FREE_DISASSEMBLER then, I guess.
- Sandeep Datta (3/3) May 18 2012 Ok, I just saw this
Hi, Is there a way by which I can see the assembly code generated by the D compiler similar to the -S etc switches on GCC? Regards, Sandeep Datta.
May 18 2012
On 18-05-2012 16:46, Sandeep Datta wrote:Hi, Is there a way by which I can see the assembly code generated by the D compiler similar to the -S etc switches on GCC? Regards, Sandeep Datta.Not with DMD. What you have to do is disassemble the file with objdump -D foo.o (add -M intel to maintain your sanity) On Windows, there's a dump tool called dumpobj shipped with DMD IIRC. -- Alex Rønne Petersen alex lycus.org http://lycus.org
May 18 2012
On Friday, 18 May 2012 at 14:48:07 UTC, Alex Rønne Petersen wrote:On 18-05-2012 16:46, Sandeep Datta wrote:Wow, that was fast! Many thanks Alex Rønne Petersen.Hi, Is there a way by which I can see the assembly code generated by the D compiler similar to the -S etc switches on GCC? Regards, Sandeep Datta.Not with DMD. What you have to do is disassemble the file with objdump -D foo.o (add -M intel to maintain your sanity) On Windows, there's a dump tool called dumpobj shipped with DMD IIRC.
May 18 2012
Alex Rønne Petersen:On Windows, there's a dump tool called dumpobj shipped with DMD IIRC.I think you refer to "obj2asm", that's not shipped with DMD. (A -S (or -asm) switch for DMD would be quite nice and useful). Bye, bearophile
May 18 2012
On 18-05-2012 17:18, bearophile wrote:Alex Rønne Petersen:Hmm, I could've sworn there was a tool for this shipped with the DMD tool chain... odd.On Windows, there's a dump tool called dumpobj shipped with DMD IIRC.I think you refer to "obj2asm", that's not shipped with DMD.(A -S (or -asm) switch for DMD would be quite nice and useful).The trouble is that DMD assembles code in memory rather than deferring to an assembler...Bye, bearophile-- Alex Rønne Petersen alex lycus.org http://lycus.org
May 18 2012
On Friday, 18 May 2012 at 15:25:53 UTC, Alex Rønne Petersen wrote:Hmm, I could've sworn there was a tool for this shipped with the DMD tool chain... odd.The Linux folder of dmd has obj2asm, but the Windows version is part of Walter's $15 extended utilities package.
May 18 2012
On 18-05-2012 17:30, Adam D. Ruppe wrote:On Friday, 18 May 2012 at 15:25:53 UTC, Alex Rønne Petersen wrote:Well, there's always $INSERT_RANDOM_FREE_DISASSEMBLER then, I guess. -- Alex Rønne Petersen alex lycus.org http://lycus.orgHmm, I could've sworn there was a tool for this shipped with the DMD tool chain... odd.The Linux folder of dmd has obj2asm, but the Windows version is part of Walter's $15 extended utilities package.
May 18 2012
Ok, I just saw this http://stackoverflow.com/questions/3592587/digital-mars-d-compiler-acquiring-asm-output But please do let me know if it is still relevant.
May 18 2012