[Lldb-commits] [PATCH] D17449: Handle the case when a variable is only valid in part of the enclosing scope
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 19 10:54:50 PST 2016
clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.
DWARF already has support for this using location lists. I would rather see this done by having the DWARF parser modify the DWARF expression to be a location list based. I don't mean have the compiler change, but just how we store the location in the variable. This would mean the ONLY change will be in the DWARF parser. We don't need to track any ranges or anything in the variable this way.
So if you have a variable:
DW_AT_location (0x11 0x22 0x33) (location is described by a block of DW_OP_expression bytes)
Then we would make a location list expression where the DWARFExpression's type is switched from:
NonLocationList with bytes of 0x11, 0x22, 0x33
over to a DWARFExpression whose type is:
RegularLocationList with [0x1020-0x2000): 0x11, 0x22, 0x33
If that doesn't make sense let me know. If we do this, then the ONLY change is in the DWARF parser since we already support location list based expressions.
More information about the lldb-commits