On 17 December 2012 09:29, Walter Bright <newshound2@digitalmars.com> wrote:
On 12/17/2012 1:15 AM, Paulo Pinto wrote:
http://www.hopperapp.com/

I really like the way it generates pseudo-code and basic block graphs out of
instruction sequences.

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.

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.


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...


Regards,
--
Iain Buclaw

*(p < e ? p++ : p) = (c & 0x0f) + '0';