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
  https://reviews.llvm.org/D55991/new/

https://reviews.llvm.org/D55991



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to