SCOUG-Programming Mailing List Archives
Return to [ 22 |
April |
2004 ]
<< Previous Message <<
>> Next Message >>
Content Type: text/plain
Lynn H. Maxson wrote:
>
> At the last meeting someone raised the question of converting
> existing programs to PL/E, later named to SL/I. I responded
> that it would not involve a source to source conversion, but
> instead one of an executable to source. In that manner you
> needed only one conversion program regardless of the source
> language(s) used. In effect to "reverse engineer" or
> "disassemble" the executable whether .exe, .sys, or .whatever
> to PL/E source.
>
> ...
>
> I would like to address that at some point in the future.
> Having had some experience in disassembling PL/I and COBOL
> executables into their PL/I and COBOL source for clients who
> had "lost" their source, I would like to demonstrate the
> process. In that manner also illustrate its automation.
I've disassembled a wide variety of binaries (machine code programs) and
I wrote an assembler-to-PL/I translator a number of years ago.
There are problems with this approach. Not insurmountable problems, but
it's not easy.
Your output, whether discrete statements or specifications, is lacking
in all of the creative thought which went into the software. You've
lost any "why I used QuickSort instead of Shell-Metzner" comments or
insights. It's like going down to the adult store and buying a
life-size inflatable doll. It looks about right, but there's something
_missing_ here.
There are some tricks. The library code which is in the executables
need only be disassembled and analyzed once, and all other users of the
same library can partake of those results; thus, you can create a
disassembly library containing these often-used routines. Your
disassembler can include blocking so it's easier to figure out the major
sections of the .exe.
But what do you do with things like error codes? The library routine
can return a -17 error code but the program you are disassembling
doesn't have a handler for -17 and you don't have any documentation that
tells you what -17 means. Now what do you do?
Not insurmountable, but it's not going to be easy.
As for PL/E, the syntactically closest open source compiler I can think
of is Ada. Do you think the PL/E tool development effort should start
from scratch, or do you think it should modify an existing tool?
- Peter
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"rollin@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 22 |
April |
2004 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|