Generating assembly from dmd

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Sun Dec 22 08:47:38 PST 2013


On 22/12/13 16:15, H. S. Teoh wrote:
> On Sun, Dec 22, 2013 at 07:04:54AM -0800, H. S. Teoh wrote:
>> This is what I do:
>>
>> 	dmd -oprogram mod1.d mod2.d ...
>
> Also, using the -g switch here may help, by including information that
> lets objdump figure out which identifiers are being referenced by
> hexadecimal addresses in the program (i.e., 'call
> std.stdio.writeln+0x123' as opposed to 'call 0x123456').
>
>
>> 	objdump -D program | ddemangle > program.asm
>> 	vi program.asm
>> 	# search for symbol, e.g., "writeln". Assuming ddemangle has
>> 	# succesfully demangled the symbol you're looking for (sometimes
>> 	# it doesn't), you can just search for it as-is.
> [...]

Thanks muchly :-)



More information about the Digitalmars-d-learn mailing list