# Extending loclists with common sublists Section 2.6.2 Location Lists and Section 2.17.3 Non-Contiguous Address Ranges This proposal introduces a mechanism for loclists and rnglists to share location list or range list fragments among multiple location or range lists. In Section 2.6.2: * List inclusion. This kind of entry includes entries from another loclist in the current location list. It can be used to share list entries among multiple location lists. In Section 2.17.13: * Range inclusion. This kind of entry includes entries from another rnglist into the current range list. It can be used to share range entries among multiple range lists. In Section 2.6.2, page 44, add following 1. `DW_LLE_end_of_list`: 2. DW_LLE_include_loclistx This is a form of list inclusion, that has one unsigned LEB128 operand. The value is an index into the .debug_loclists section, interpreted the same way as the operand of DW_FORM_loclistx to find a target list of entries, which will be regarded as part of the current loclist, up to the DW_LLE_end_of_list entry. In Section 2.6.2, page 45, add after 8. `DW_LLE_start_length`: 9. DW_LLE_include_loclist This is a form of list inclusion, that has one offset operand. The value is an offset into the .debug_loclists section, like the operand of a DW_FORM_sec_offset loclist. The offset identifies the first entry of a loclist whose entries are to be regarded as part of the current loclist, up to the DW_LLE_end_of_list_entry. In Section 2.17.3, page 53, add following 1. `DW_RLE_end_of_list`: 2. DW_RLE_include_rnglistx This is a form of range inclusion, that has one unsigned LEB128 operand. The value is an index into the .debug_rnglists section, interpreted the same way as the operand of DW_FORM_rnglistx to find a target list of entries, which will be regarded as part of the current rnglist, up to the DW_RLE_end_of_list entry. In Section 2.17.3, page 54, add after 8. `DW_RLE_start_length`: 10. DW_RLE_include_rnglist This is a form of range inclusion, that has one offset operand. The value is an offset into the .debug_rnglists section, like the operand of a DW_FORM_sec_offset rnglist. The offset identifies the first entry of a rnglist whose entries are to be regarded as part of the current rnglist, up to the DW_RLE_end_of_list_entry. In Section 7.7.3, add to Table 7.10: DW_LLE_include_loclist | 0x?? DW_LLE_include_loclistx | 0x?? In Section 7.25, add to Table 7.30: DW_RLE_include_rnglist | 0x?? DW_RLE_include_rnglistx | 0x?? --- 2021-04-15: Revised from 170427.2. Previous version: http://dwarfstd.org/issues/170427.2-1.html 2021-07-12: Revised. Previous version: http://dwarfstd.org/issues/170427.3-1.html 2023-01-23: Revised. 2023-02-03: Revised. Previous version: http://dwarfstd.org/issues/170427.3-2.html