OSDN Git Service

[DWARFYAML] Implement the .debug_rnglists section.
authorXing GUO <higuoxing@gmail.com>
Mon, 20 Jul 2020 02:42:27 +0000 (10:42 +0800)
committerXing GUO <higuoxing@gmail.com>
Mon, 20 Jul 2020 02:42:27 +0000 (10:42 +0800)
commit1ab3d6c81902022da245707697dfe173cc5a07a2
tree45f1a9568050d6a68b723a721f9c3b324b71e133
parent30201d3b611f034214e6e1bc8c8faae7d1246ec8
[DWARFYAML] Implement the .debug_rnglists section.

This patch implements the .debug_rnglists section. We are able to
produce the .debug_rnglists section by the following syntax.

```
debug_rnglists:
  - Format:              DWARF32 ## Optional
    Length:              0x1234  ## Optional
    Version:             5       ## Optional
    AddressSize:         0x08    ## Optional
    SegmentSelectorSize: 0x00    ## Optional
    OffsetEntryCount:    2       ## Optional
    Offsets:             [1, 2]  ## Optional
    Lists:
      - Entries:
          - Operator: DW_RLE_base_address
            Values:   [ 0x1234 ]
```

The generated .debug_rnglists is verified by llvm-dwarfdump, except for
the operator DW_RLE_startx_endx, since llvm-dwarfdump doesn't support
it.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D83624
llvm/include/llvm/ObjectYAML/DWARFEmitter.h
llvm/include/llvm/ObjectYAML/DWARFYAML.h
llvm/lib/ObjectYAML/DWARFEmitter.cpp
llvm/lib/ObjectYAML/DWARFYAML.cpp
llvm/lib/ObjectYAML/ELFEmitter.cpp
llvm/test/tools/yaml2obj/ELF/DWARF/debug-rnglists.yaml [new file with mode: 0644]