summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/StackFrame.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-04-26 00:29:59 +0000
committerJim Ingham <jingham@apple.com>2016-04-26 00:29:59 +0000
commitcef461772e9b1648d2e5916ac38a1e5a5b4ee523 (patch)
tree844cbf4e0512ec2e6246ab592e3da2a2c2ab936f /lldb/source/Target/StackFrame.cpp
parent1a075013793a80fd76185d26d7634ac78d231b98 (diff)
downloadbcm5719-llvm-cef461772e9b1648d2e5916ac38a1e5a5b4ee523.tar.gz
bcm5719-llvm-cef461772e9b1648d2e5916ac38a1e5a5b4ee523.zip
When building the list of variables we're going to write "using $_lldb_local_vars"
statements for, be sure not to include variables that have no locations. We wouldn't be able to realize them, and that will cause all expressions to fail. llvm-svn: 267500
Diffstat (limited to 'lldb/source/Target/StackFrame.cpp')
-rw-r--r--lldb/source/Target/StackFrame.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp
index 7a566092e03..d63fa132bc3 100644
--- a/lldb/source/Target/StackFrame.cpp
+++ b/lldb/source/Target/StackFrame.cpp
@@ -571,7 +571,7 @@ StackFrame::GetVariableList (bool get_file_globals)
}
VariableListSP
-StackFrame::GetInScopeVariableList (bool get_file_globals)
+StackFrame::GetInScopeVariableList (bool get_file_globals, bool must_have_valid_location)
{
Mutex::Locker locker(m_mutex);
// We can't fetch variable information for a history stack frame.
@@ -589,7 +589,10 @@ StackFrame::GetInScopeVariableList (bool get_file_globals)
m_sc.block->AppendVariables (can_create,
get_parent_variables,
stop_if_block_is_inlined_function,
- [this](Variable* v) { return v->IsInScope(this); },
+ [this, must_have_valid_location](Variable* v)
+ {
+ return v->IsInScope(this) && (!must_have_valid_location || v->LocationIsValidForFrame(this));
+ },
var_list_sp.get());
}
OpenPOWER on IntegriCloud