Thanks everyone for the feedback ! Just wanted to follow up and explicitly clarify some things before jumping into the implementation for this:
- Since this will be usable with gSYM in llvm upstream, the name of the attr will be DW_AT_LLVM_stmt_sequence
- The attr will be a constant offset of type
.Lline_table_fragment_for_foo - .Lline_table_start
- The attr will only be generated if a flag is specified, and if enabled, all the subprograms in the CU will get this attr.
- The attr will always point to the beginning of a line sequence - meaning each function will have a start and end line sequence in the line table
- This will be implemented in the compiler (i.e. the attr will be in object files).
The implementation timeline will look roughly like:
- RFC for assembler changes that would allow doing
.Lline_table_fragment_for_foo - .Lline_table_start
- Implement support for the attribute in the assember - i.e. the above RFC
- Implement generating the attribute in clang
- Implement handling the attribute in the dwarf linker
- Implement gSYM format extension to incorporate the new data allowed by the attribute
- Implement intelligent gSYM lookup using callsite based disambiguation