This patch helps add support for emitting the .debug_info section to yaml2elf.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml | ||
---|---|---|
457 | In order not to bring too much difficulty. The common tests are very similar to the tests in other DWARF sections, except this one. The property of the .debug_abbrev section is overridden as well in this test. |
llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml | ||
---|---|---|
191–192 | You probably also want Version 4 and testing for different UnitType values. | |
198 | To ensure there are no truncation issues, all these values probably should be the same width as their permissable data could be (e.g. 8 bytes for DW_FORM_data8, 4 for DW_FORM_data4 etc, so 0x1234567890abcdef, 0x12345678 etc). | |
232 | FWIW, DW_FORM_flag_present doesn't have a corresponding value in .debug_info, so maybe you can omit it from here. It probably needs leaving in the .debug_abbrev table though. | |
457 | I'm not sure I follow. What's the point of overriding .debug_abbrev too? It will at least need explaining in a comment. |
llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml | ||
---|---|---|
457 | I want to test that yaml2obj is still able to overwrite the section header fields of the .debug_abbrev section when the .debug_info section exists. Does it make sense here? |
llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml | ||
---|---|---|
457 | Is there actually any interaction in the code between the .debug_abbrev and .debug_info header writing? If not, I don't think you need to test the combination. |
Address comments.
Thanks for reviewing!
llvm/test/tools/yaml2obj/ELF/DWARF/debug-info.yaml | ||
---|---|---|
457 | There is not interaction between the .debug_abbrev and .debug_info except for reading forms from debug_abbrev when generating values. Thanks :-) |
Trying to make pre-merge check bots happy (Seems that there is an index-out-of-range error).
Add one empty entry to fallible compilation units.
Let's see if pre-merge bots are happy with this change.
You probably also want Version 4 and testing for different UnitType values.