The DCU32INT utility by Alexei Hmelnov. Version 1.10.1 ---------------------------------------------------------------------------- E-Mail: alex@icc.ru http://hmelnov.icc.ru/DCU/ ---------------------------------------------------------------------------- Purpose. -------- Parse Delphi 2.0-8.0, 2005(.net and WIN32), 2006(WIN32 only), Kylix 1.0-3.0 units (DCU) and convert their information into the close to Pascal form. DCU32INT stands for DCU32 INTerface, because this program can't extract the complete Pascal source, but the extracted unit interface is almost correct (see Compiler Information Loss Limitations section for exceptions). This program is a by-product of the FlexT project (see http://hmelnov.icc.ru/FlexT/ for details), but I have done my best to make it useful. Changes from the version 1.0. ----------------------------- Version 1.10.1: 1. Added displaying of possible inline string constants (use -SH to turn it off). 2. The Self arguments of methods and 2nd call flags of constructors and destructors are hidden now. To show them as before use -SS option. 3. Auxiliary fake procedures, which hold the values of huge string typed constants are marked now by the JustData flag and not disassembled. Version 1.10.0: 1. Units of Delphi 2006 (WIN32) were parsed successfully. Version 1.9.0: 1. Units of Delphi 2005 (WIN32, .net) were parsed successfully. Version 1.8.0: 1. The generic disassembler was implemented. It is now possible to register a new disassemblers using the call SetDisassembler(ReadCommand, ShowCommand,CheckCommandRefs) 2. The MSIL (MicroSoft Intermediate Layer) disassembler for .net code was implemented. 3. Units of Delphi 8.0 were parsed successfully. Version 1.7.4: 1. Some control flow analysis was implemented for disassembler (the -AC program option). Version 1.7.3: 1. Units of Delphi 7.0 were parsed successfully. Version 1.7.2: 1. Units of open Kylix 3.0 were parsed successfully. Version 1.7.1: 1. Units of open Kylix 3.0 were parsed successfully. Version 1.7.0: 1. Some units of trial Delphi 7.0 were parsed successfully. Version 1.6.4: 1. A problem was fixed with resourcestring sections inside procedures. Version 1.6.3: 1. Some tricky Kylix header fields prevented from processing some files. This problem was fixed, but only for the examples of Kylix DCUs, which I have. Please, send me DCUs, which still can't be parsed. Version 1.6.2: 1. Kylix 2.0 units are supported. In fact, only the file signature change was detected. Version 1.6.1: 1. The DCU32INT sources can now be compiled under Kylix. 2. User units compiled under Kylix have another header structure, than that of Kylix LIB units, on which DCU32INT was originally tested. The program was fixed to take it into account. Version 1.6.: 1. Delphi 6.0 and Kylix 1.0 units are supported now. Note, this feature is new and it was tested almost only on the .\LIB\*.dcu files (see Validity), so bug reports are welcome with the units, which were not parsed correctly, applied. Please send them to alex@icc.ru. 2. When analyzing Delphi 6 and Kylix DCU format, the data types of some fields were clarified. In particular, some byte fields become indices, because additional bits of their values were used. I believe, that the fields were indices in all the previous Delphi versions too, but I had not enough information to detect it. So I hope, that the new DCU specification become more precise. But, if somebody will encounter units of previous Delphi versions, which DCU32INT can't parse now, please, send them to me. 3. Some additional tables in the tail of DCU, which were ignored by version 1.0, are processed now. In particular, the program reports line numbers in the disassembled code, if the line numbers information is present. Usage. ------ DCU32INT [] Destination file may contain * to be replaced by the unit name or name and extension. If * is the last char in the name, it will be replaced by .int, else - by . Destination file = "-" => write to stdout. Flags (start with "/" or "-"): -S* - Show flags (-S - show all), default: (+) - on, (-) - off A(-) - show Address table C(-) - don't resolve Constant values D(-) - show Data block d(-) - show dot types F(-) - show Fixups H(+) - show Heuristic strings I(+) - show Imported names L(-) - show table of Local variables M(-) - don't resolve class Methods O(-) - show file Offsets S(-) - show Self arguments of methods and 2nd call flags of `structors T(-) - show Type table U(-) - show Units of imported names V(-) - show auxiliary Values v(-) - show VMT -O