[PATCH] D39854: [DWARFv5] Support FORM_strp in .debug_line.dwo

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 17:09:09 PST 2017


probinson added a comment.

Oh, head-smack!  You don't need a unit to know the address size; the line table has always had that info, although indirectly.
DW_LNE_set_address (the only opcode that specifies an actual address) is an extended opcode, which has a ULEB telling you how long the operands are.  Which is, one byte for the opcode, and.... the size of the address.  Doh!

That means, DWARF v5 is the first time we actually *do* (sometimes) need a unit to parse the .debug_line section, instead of the first time we *don't* need it.

This patch is about one of the cases where we do need a DWARFUnit, so I think it's not particularly affected by this revelation, but there is likely to be some simplification that can be done as a follow-up.


https://reviews.llvm.org/D39854





More information about the llvm-commits mailing list