This patch adds support for dumping the .debug_ranges section to
elf2yaml.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/tools/obj2yaml/ELF/DWARF/debug-ranges.yaml | ||
---|---|---|
8 |
Same applies throughout. | |
47 | As you're not doing any arithmetic here, I'd just match the number as a string. Same below with the low/high offsets. This simplifies both the check here and the definition above (i.e. -DOFFSET=0x18 or whatever). | |
59–63 | Add a comment explaining the need for the debug_info bit. | |
86 | This and the following lines probably want to be RAW-SAME, and start with a {{$}} to ensure there's nothing in between the previous match and the checked-for one. | |
109 | Probably should show that there's no Sections: tag here. | |
123 | Same below. Whilst the 80-column width style guide doesn't really apply in tests, it's good to avoid the lines getting too long, in my opinion, as it is easier to read. Also RANGES and SHDR are always both checked, so combine them to a single prefix (e.g. COMMON). |
Address review comments.
llvm/test/tools/obj2yaml/ELF/DWARF/debug-ranges.yaml | ||
---|---|---|
86 | It looks that FileCheck is not happy when the check line starts with a {{$}}. I think using {{^}} to check that the rest buffer exactly starts with our check string is fine here. What do you think? |
LGTM, with a couple of nits.
llvm/test/tools/obj2yaml/ELF/DWARF/debug-ranges.yaml | ||
---|---|---|
86 | Sorry, {{^}} was what I meant (I got mixed up between start and end of line regex). | |
97 | No need for the "should". Hard to explain from a grammatical perspective though! | |
150 | This should be less brittle in case any user paths start appearing in the output at some point. |
Same applies throughout.