Board index » delphi » Help to verify valid source

Help to verify valid source

I've recently taken over a large project written in Borland Pascal 7.
I've been trying to verify that I have the correct source code for the
running system.  I am not able to contact the original developer!  

Although I have been programming for 29 years, I have not worked in
Turbo Pascal for over 10 years!

I compiled the programs and compared the resulting .EXE's to the running
system.  The sizes differ.  Sometimes more, sometimes less.

I have experimented with various compiler options and saw how choosing
different options will vary the .EXE size.

Can anyone tell me how to determine which options were used to create an
EXE?

Can you suggest any way that I can validate that I have the correct
source?  

Thank you in advance.

// Walt //

-  Walter Sloan / The SystemSmith, Ltd / New York, NY 10021
-  212-327-1964 / FAX: 212-717-2353 / Reply: Wa...@TheSystemSmith.Com

 

Re:Help to verify valid source


Quote
> I've recently taken over a large project written in Borland Pascal 7.
> I've been trying to verify that I have the correct source code for the
> running system.  I am not able to contact the original developer!  
> I compiled the programs and compared the resulting .EXE's to the running
> system.  The sizes differ.  Sometimes more, sometimes less.

   Are you using the same version of TP which he/she used?  Since that's
doubtful, there's no way they could all be the same.

Quote
> I have experimented with various compiler options and saw how choosing
> different options will vary the .EXE size.
> Can anyone tell me how to determine which options were used to create an
> EXE?

   Hmmm, not that I know of.

Quote
> Can you suggest any way that I can validate that I have the correct
> source?  

   The only thing that comes to mind is an examination of the date stamps
on the sources and .EXEs: unless something truly weird has occurred, the
.EXE files should have date/time stamps >= the .PAS sources.  If not,
then...
   Of course, this is complicated by the issue with Units: if a
particular Unit was used in two or more different programs, it was needed
to compile both.  If one .EXE is newer than all its source(s), including
the Units sources it uses, everything's fine.  However, if another
program is also newer than its source, but OLDER than the source of one
or more of its Units, you have a problem - because recompiling it will
force it to use the (newer) Unit's .TPU and something will be different.
   So, unless you're lucky enough to find that all .EXEs are newer than
their sources (all sources used to build the programs), there seems to no
way to accurately and completely see what's changed and how.  That
probably being the case you have, I'd say obtaining this particular
information is futile...and that you'll have to find another way of
determining what's "different" in the system (and reengineering the
system to establish whatever "state" you're aiming for).
   A question, through: why is it so important to get this information?  
Do you believe that someone has tampered with the source code and that
making changes to/submitting/using the system to someone is a risk?  
Unless something pathological _has_ occurred, it would make sense that
whatever's changed for any given program in the system was done for a
valid reason and that all other programs should follow suit (by being
rebuilt with newer sources, Units, compilers, whatever).  I would also
say that your efforts to start working with this system should include
significant time to establish a "baseline" of its production qualities
(run it, save all outputs for comparison, etc.) and go forward with the
requested changes from there.
   I'm making the assumption that your task is to take over a system
that's been dormant and upgrade it for someone.  Such being the case,
won't your customer have something planned or in place aimed at
validating your changes as well as uncovering regressions which come up?  
I should hope so...

Other Threads