Wednesday, April 15, 2015

Delphi RSM file

When you check option "Linking\Include remote debug symbols" compiler will produce RSM file.

File starts with 4-byte signature "CSH7" which should stand for Compiler State Header 7.

Next 4 bytes (uint32) is size of header at file start, so new format can easily add needed fields. Typically it is 0x420, at least for XE7, where 0x20 are few fields at start and 0x400 is target executable relative path.

Header also contain fields: unit count, image base, version id which also used in DCUs and few other fields.

Next are few string lists which contain search paths, output paths, unit aliases.

Then image base once again.

Last block contains DCUs, which takes most of the file space.

No comments:

Post a Comment