Column information for the CodeView debug info format

Hello,

LLVM currently supports emission of CodeView’s line table subsection. However, we’d like to increase the fidelity of this debug info with column information. I was wondering if anybody had any pointers as to how CodeView represents such information.

Thanks!

The line number section you already emit looks like:

(0…3) SECREL relocation to function

(4…5) Section index of function

(6…7) Padding

(8…11) Code Size

The “Padding” field is actually a flags field, with one flag defined: bit 0 of that field should be set if there is column info in this line number subsection.

The actual column info is emitted as part of the same chunks that contain the line numbers for a given file name. Each chunk looks like:

(0…3) Offset of file in the file name table

(4…7) Count of line numbers (n)

(8…11) Size of chunk

(12…12+8*n) Line number records

(12+8n…12+8n+4*n) Column records (if column info flag was set)

Each column info record looks like:

(0…1) Start Column

(2…3) End Column

Note that the chunk includes all of the line number records before any of the column records.

-Dave

The line number section you already emit looks like:

(0..3) SECREL relocation to function

(4..5) Section index of function

(6..7) Padding

(8..11) Code Size

The “Padding” field is actually a flags field, with one flag defined: bit
0 of that field should be set if there is column info in this line number
subsection.

The actual column info is emitted as part of the same chunks that contain
the line numbers for a given file name. Each chunk looks like:

(0..3) Offset of file in the file name table

(4..7) Count of line numbers (n)

(8..11) Size of chunk

(12..12+8*n) Line number records

(12+8*n..12+8*n+4*n) Column records (if column info flag was set)

Each column info record looks like:

(0..1) Start Column

(2..3) End Column

Note that the chunk includes all of the line number records before any of
the column records.

Thanks! Should be implemented in r241764.