clayborg added a comment.

I would rather do this by modifying the expression locations if at all 
possible. I would like to not having to modify each variable to contain a 
RangeList as this is extra data per variable. I would be fine if we just add a 
new enumeration to the DWARFExpression like StartScopeLocationList which is the 
same as "RegularLocationList". The contents would be the same (start address + 
end address followed by location expression block), but it would mean that the 
locations indicate that the variable is in scope (instead of just not 
available). Then we just need to modify Variable::IsInScope() to check what it 
did before, and if the DWARFExpression is StartScopeLocationList, just make 
sure we have a location that contains the current address. Does that sound 
acceptable? I am also OK with modifying the DWARFExpression class to be able to 
return an enumeration when the DWARFExpression is evaluated so it can return 
things like:

eDWARFExpressionSuccess
eDWARFExpressionVariableNotAvailable
eDWARFExpressionOutOfScope
eDWARFExpressionError

Then RegularLocationList would return eDWARFExpressionVariableNotAvailable when 
there is no location that the variable is available, and StartScopeLocationList 
would return eDWARFExpressionOutOfScope.


http://reviews.llvm.org/D17449



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

Reply via email to