[Lldb-commits] [PATCH] D55991: DWARF: Fix a bug in array size computation
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 21 09:19:41 PST 2018
labath added a comment.
Hm.. I can't say I have given much thought about this beforehand, as I just copied this code from llvm. However, now that I did think about it, I believe the current implementation makes sense. Nothing about DWARFFormValue::Reference (well, except the local variable name, which I guess I should rename) says it must return a DIE offset. `DW_FORM_ref_sig8` is not a die offset, but it is certainly a DIE reference, albeit one that must be resolved in a more complicated way. This is also the view taken by the DWARF 5 spec (section 7.5.5 "Classes and Forms" lists `DW_FORM_ref_sig8` as a reference form). And I expect this is the what the llvm implementation is based on.
So, in order to minimize confusion, I think we should stick to this definition. The code for resolving the more complex reference forms can live in some higher level code (`DWARFDIE::GetReferencedDie` ?), where it will be in a better position to locate and extract the DIE from other sections/object files.
CHANGES SINCE LAST ACTION
More information about the lldb-commits