[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Disassemblers - Generate compiler code-x's source code?



> Date: Mon, 17 Apr 2000 06:35:19 +1000
> From: Peter Gargano <peter@ntserver.techedge.com.au>
> Subject: Disassemblers - Generate compiler code-x's source code?
> 
> I take it the emphasis of the (IDA Pro's) disassembler is to find
> high level code, meaning it could be told enough about a compiler's
> output, to allow it to make intelligent choices at converting sequential
> assembler into something like if/then/else, etc. structured code?
> 
> I find this concept pretty appealing for "hacking" GM code. But there are
> at least two hurdles to overcome to capitalise on these thoughts:
> 
>   1. Do we know (ie. not speculate) what GM's source was written in?
>      I'm assuming that they didn't use assembler, and I'm not speculating
>      that they used anything I've heard rumours about. (OTOH, does it
>      matter?)
> 
>   2. Assuming we know GM's source language, can we find/make a compiler
>      that can compile our high level source we can "disassemble" into?
> 
> OTOH, perhaps we, as a group, are smart enough to think up with our own
> language that compiles back to an original GM style.
> 
> For those whose eyes have glazed over - I'm suggesting that it's possible
> to write a "disassembler" that converts GM bins to a language "code-x",
> and that it's possible to write a code-x compiler to compile code-x
> source, and produce P4 (etc.) assembler.
> 
> Anyone finds this appealing (or is that appalling?)
> 
> PG.


Peter,

No, unfortunately IDA doesn't convert back to a high-level language
syntax (at least not that I know of)...  What it does is library pattern
matching/recognition -- kind of like programs that check for viruses
(like Norton Antivirus)...  There are signatures or fingerprints of all
of the common compiler libraries included with IDA Pro like MSVCRT (MS
Visual C runtime) etc...  What it does is that when it finds a copy of
the fingerprint in the code, it flags it with that code's real name,
calling conventions, etc...  Like "printf", etc...  The beauty is that
you can add your own functions to it -- so if someone were to figure out
what a section of code did in a PCM, they could add a fingerprint for it
to a common library that was shared by the list and then when others are
disassembling code, it would detect the fingerprint (though it might be
at different physical addresses or appear slightly different) and flag
the code with information from the library....  It makes code much more
readable and eliminates duplicating effort...

As for what language GM used, well, in the older P4 PCM's, they used
Modula-GM -- a custom version of Modula-2 written by AverStar (a company
formed by the merger of Intermetrics, Inc. and Pacer Infotec, Inc.):

http://www.averstar.com/customers/delphi.html

In fact, here's a link I found to the resume of a guy that has worked
for Delphi (and done some Modula-GM programming):

http://www.tctc.com/~pburgess/pat/resume/

Perhaps the list could recruit him ;)

On the newer P5 PCM's with the 332's, the primary language they are
using is C, some of which is auto-generated from simulation software...

Donald
----------------------------------------------------------------------------
To unsubscribe from gmecm, send "unsubscribe gmecm" (without the quotes)
in the body of a message (not the subject) to majordomo@lists.diy-efi.org