This patch adds support for dumping the .debug_addr(v5) section to
obj2yaml.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/DebugInfo/DWARF/DWARFDebugAddr.cpp | ||
---|---|---|
187 ↗ | (On Diff #291510) | All these getters are short. I'd just implement them in the header file. |
llvm/test/tools/obj2yaml/ELF/DWARF/debug-addr.yaml | ||
183 | a->an | |
208 | I wonder if instead we should just provide a section description with an arbitrary unsupported content. Sections: - Name: .debug_addr Content: "AABBCC" | |
225 | I'd probably use Sections: - Name: .debug_addr Size: 0 It is a bit more straighforward way to describe an empty section and still | |
llvm/tools/obj2yaml/dwarf2yaml.cpp | ||
78 | I think you can avoid having Entries and insert directly to SegAddrPairs? | |
80 | You can avoid copying a vector with Y.DebugAddr = std::move(AddrTables); |
llvm/test/tools/obj2yaml/ELF/DWARF/debug-addr.yaml | ||
---|---|---|
8 | Any reason you have separate variables for the two address sizes? As far as I can see, they are identical always. | |
9 | This is more robust against other data being emitted in the future causing failures, in my opinion. | |
10–14 | I found the naming scheme of these variables a bit confusing, as I was trying to match up "12" with the value "14", when really you meant "length one-two". I'd just go with LENGTH1 and LENGTH2 etc, i.e. the number of times the value is reused is irrelevant to the naming in this contaxt, at least. | |
83 | Nit: here and below. | |
184 | I think this is a little cleaner English. |
Address review comments.
Thanks for reviewing!
llvm/test/tools/obj2yaml/ELF/DWARF/debug-addr.yaml | ||
---|---|---|
8 | Oh, sorry. I should use one address size here. |
Any reason you have separate variables for the two address sizes? As far as I can see, they are identical always.