Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!think.com!mintaka!spdcc!esegue!compilers-sender From: vu0310@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (R. Kym Horsell) Newsgroups: comp.compilers Subject: Re: Help on disassembler/decompilers Keywords: assembler, debug Message-ID: <3972@bingvaxu.cc.binghamton.edu> Date: 10 Sep 90 03:45:26 GMT References: <6839.26ea3b0e@vax1.tcd.ie> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: vu0310@bingvaxu.cc.binghamton.edu.cc.binghamton.edu (R. Kym Horsell) Organization: SUNY Binghamton, NY Lines: 29 Approved: compilers@esegue.segue.boston.ma.us In article <6839.26ea3b0e@vax1.tcd.ie> rwallace@vax1.tcd.ie writes: >There's no unique mapping from machine code to HLL and hence (unlike machine >code to assembler) no simple algorithm (your algorithm might recognize >something it thinks is a loop but is it a for loop, a while loop or just >something hacked together with gotos? that's before you even think about what >optimized machine code will look like). You could probably figure out a There's no _unique_ mapping from HLL into assembler, or from assembler into assembler for that matter, either! In _principle_ translation between assembler and an HLL is no harder than the other way 'round. You can't even say that "assembly language is close to the machine & you can do things in it that you can't in HLLs" -- after all, assembly and HLL are both capable of emulating Turning machines, right? I have made various attempts at writing assemlber -> HLL translators over the years, mostly inspired by the `beatify' tool that attempts to transform spagetti FORTRAN into structured FORTRAN. A bit of graph thy is all that's needed for __most_ of that. I ultimately see such tools as pointless, however, in that they only encourage the maintenance of ``dusty deck'' stuff (in a new prettier form) -- re-inventing the wheel occasionally comes up with a better wheel! -Kym Horsell -- Send compilers articles to compilers@esegue.segue.boston.ma.us {ima | spdcc | world}!esegue. Meta-mail to compilers-request@esegue.