[Lldb-commits] [PATCH] D17449: Handle the case when a variable is only valid in part of the enclosing scope

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 24 04:27:33 PST 2016

tberghammer updated this revision to Diff 48908.
tberghammer added a comment.

I added the memory optimization to represent the case when no DW_AT_start_scope is specified as an empty range map. This way the memory impact for C/C++ will be only an empty std::vector per variable.

Regarding the location of the code I don't want to add it to DWARFExpression because dwarf expressions are used for much more thing then variable locations on their own. If an other DIE needs this information in the future then I would suggest to introduce a new class (don't have any good name for it) containing a DWARFExpression representing the location and a RangeMap representing the scope information.

In long term (don't have time from for it) I would also want to split DWARFExpression to 2 class where one of them know how to evaluate a dwarf expression and can represent only a single dwarf expression. Next to it I want to introduce a new DWARFLocationList class what knows about the location list part with no knowledge about the DWARF opcodes. The 2 class can be closely integrated so we don't need to parse anything upfront while we are keeping the 2 concept separated.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17449.48908.patch
Type: text/x-patch
Size: 18769 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160224/54931309/attachment-0001.bin>

More information about the lldb-commits mailing list