summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/Variable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Symbol/Variable.cpp')
-rw-r--r--lldb/source/Symbol/Variable.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Symbol/Variable.cpp b/lldb/source/Symbol/Variable.cpp
index a868e5f5cbb..161d4826bad 100644
--- a/lldb/source/Symbol/Variable.cpp
+++ b/lldb/source/Symbol/Variable.cpp
@@ -216,19 +216,19 @@ Variable::LocationIsValidForFrame (StackFrame *frame)
if (frame)
{
- Target *target = &frame->GetThread().GetProcess().GetTarget();
-
Function *function = frame->GetSymbolContext(eSymbolContextFunction).function;
if (function)
{
- addr_t loclist_base_load_addr = function->GetAddressRange().GetBaseAddress().GetLoadAddress (target);
+ TargetSP target_sp (frame->CalculateTarget());
+
+ addr_t loclist_base_load_addr = function->GetAddressRange().GetBaseAddress().GetLoadAddress (target_sp.get());
if (loclist_base_load_addr == LLDB_INVALID_ADDRESS)
return false;
// It is a location list. We just need to tell if the location
// list contains the current address when converted to a load
// address
return m_location.LocationListContainsAddress (loclist_base_load_addr,
- frame->GetFrameCodeAddress().GetLoadAddress (target));
+ frame->GetFrameCodeAddress().GetLoadAddress (target_sp.get()));
}
}
return false;
OpenPOWER on IntegriCloud