<div class="gmail_extra"><div class="gmail_quote">On 17 December 2012 09:29, Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 12/17/2012 1:15 AM, Paulo Pinto wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="http://www.hopperapp.com/" target="_blank">http://www.hopperapp.com/</a><br>
<br>
I really like the way it generates pseudo-code and basic block graphs out of<br>
instruction sequences.<br>
</blockquote>
<br></div>
I looked at their examples. Sorry, that's just step one of reverse engineering an object file. It's a loooooong way from turning it into source code.<br>
<br>
For example, consider an optimizer that puts variables int x, class c, and pointer p all in register EBX. Figure that one out programmatically. Or the result of a CTFE calculation. Or a template after it's been expanded and inlined.<br>

</blockquote></div><br><br>Right, there is practically zero chance of being able to come up with 100% identical D code from an object dump / assembly code.  Possibly with exception to a few *very* simple cases (hello world!).  However it looks like you might just be able to decode it into a bastardised C version.  I can't see that hopperapp to be very practical beyond small stuff though...<br>
<br><br>Regards,<br>-- <br>Iain Buclaw<br><br>*(p < e ? p++ : p) = (c & 0x0f) + '0';<br>
</div>