This patch makes the 'debug_aranges' entry optional. If the entry is
empty, yaml2obj will only emit the header for it.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/tools/obj2yaml/dwarf2yaml.cpp | ||
---|---|---|
67 | It seems to me like you don't need this vector? Could you do Y.DebugAranges.emplace() to instantiate the vector in this case? |
llvm/tools/obj2yaml/dwarf2yaml.cpp | ||
---|---|---|
67 | Actually I do it deliberately here. IMHO, if the parser encounters an error below, debug_aranges entry should keep empty. In the implementation of adding DWARF support to elf2yaml, the basic idea is that firstly, we try to parse DWARF sections into the "DWARF:" entry, if the parser fails, elf2yaml will consume that error and continue to dump it as raw content. If we don't do it here, the "DWARF:" will have an incomplete section. Shall we wait for the patch that adds DWARF support to elf2yaml to see if it works? |
llvm/tools/obj2yaml/dwarf2yaml.cpp | ||
---|---|---|
67 | Thanks for the explanation. What you say makes sense to me. |
It seems to me like you don't need this vector? Could you do Y.DebugAranges.emplace() to instantiate the vector in this case?