Re: Help on disassembler/decompilers

seanf@sco.COM (Sean Fagan)
Sun, 9 Sep 90 01:00:32 EDT

          From comp.compilers

Related articles
Help on disassembler/decompilers wwho@ucdavis.edu (1990-09-06)
Re: Help on disassembler/decompilers hrubin@l.cc.purdue.edu (1990-09-07)
Re: Help on disassembler/decompilers pardo@cs.washington.edu (1990-09-07)
Re: Help on disassembler/decompilers raul@sdnp1.ucsd.edu (1990-09-07)
Re: Help on disassembler/decompilers seanf@sco.COM (1990-09-09)
Re: Help on disassembler/decompilers rwallace@vax1.tcd.ie (1990-09-09)
Re: Help on disassembler/decompilers vu0310@bingvaxu.cc.binghamton.edu.cc.binghamton.ed (1990-09-10)
Re: Help on disassembler/decompilers hankd@dynamo.ecn.purdue.edu (1990-09-09)
Re: Help on disassembler/decompilers Chuck.Phillips@FtCollins.NCR.COM (1990-09-10)
Re: Help on disassembler/decompilers adamsf@turing.cs.rpi.edu (1990-09-10)
Re: Help on disassembler/decompilers harrison@necssd.NEC.COM (1990-09-11)
[18 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: seanf@sco.COM (Sean Fagan)
Keywords: code, assembler, debug
Organization: The Santa Cruz Operation, Inc.
References: <HOW.90Sep5173755@sundrops.ucdavis.edu> <2900@network.ucsd.edu>
Date: Sun, 9 Sep 90 01:00:32 EDT

In article <2900@network.ucsd.edu> raul@sdnp1.ucsd.edu (Raul Rathmann) writes:
>Getting it from assembly to C was pretty difficult and was
>mostly an intuitive operation. To make a program that automatically did
>this would probably be a major undertaking and even then I don't think it
>would be able to figure out certain things.


As I've pointed out before, someone once wrote a decompiler for the VAX,
which I've played with. It *knew* how PCC generated code, so, after
"disassembling" (internal use only, generally; it didn't try to decompile
assembly text, in other words), so it would structure the code generated
from that.


It's really not that difficult thing to do, if you don't have to deal with
esoteric instructions and a smart compiler.


Oh, yeah: it didn't use the symbol table, and the code it generated
certainly had some, uhm, quirks. Variable names such as 'r0' through 'r15',
for example (except for global variables, that is). Structure members were
considered different variables (I once tried decompiling fork.o, for
example; something like three quarters of the variables were offsets into
the user structure, and I came up with a little chart that had the offsets
(and sizes) of all the elements). Etc.


But it did work. Thus borneth BSD Empire.


--
Sean Eric Fagan, seanf@sco.COM, uunet!sco!seanf, (408) 458-1422
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.