Block header

Each block of information in the .debug_srctext section begins with a header, which consists of the following information:

Block length
This holds the total length of the compressed source text, and the section header, not including the block length field itself. It is also used to determine whether this block of information is 32-bit DWARF format or 64-bit DWARF format. In the 32-bit DWARF format, the first 4-byte is an unsigned integer representing the block length (which must be less than 0xFFFFFF00). In the 64-bit DWARF format, the first 4-byte is 0xFFFFFFFF, and the following 8 bytes is an unsigned integer representing the block length.
In the 64-bit DWARF format, this is a 12-byte unsigned integer, and it has two parts:
  • The first 4 bytes have the value 0xFFFFFFFF.
  • The following 8 bytes contain the actual length represented as an unsigned 64-bit integer.
Version field
A 2-byte unsigned integer represents the version of the .debug_srctext information for the block. This version is specific to the .debug_srctext section. The currently supported version is 0x0001.
Header length
The number of bytes following the header_length field to the beginning of the first byte of the compressed source text. In the 32-bit DWARF format, it is a 4-byte unsigned length; in the 64-bit DWARF format, this field is an 8-byte unsigned length.
Eye catcher
A 2-byte eye catcher to help identify the boundaries of different source text sections. The value should be 0xCDA6.
Data size
An 8-byte unsigned integer representing the size of the original source text after it has been uncompressed.