summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/StackFrame.cpp
diff options
context:
space:
mode:
authorTamas Berghammer <tberghammer@google.com>2016-02-25 12:23:37 +0000
committerTamas Berghammer <tberghammer@google.com>2016-02-25 12:23:37 +0000
commit72ac8a840fb0ea4d72747b3f5dcf260dcd345672 (patch)
treec003572a6478540b2666c0ddcb6b807f57677a8a /lldb/source/Target/StackFrame.cpp
parent2e4c72977c9bf06a8dbe7688d8cb3b66c8912037 (diff)
downloadbcm5719-llvm-72ac8a840fb0ea4d72747b3f5dcf260dcd345672.tar.gz
bcm5719-llvm-72ac8a840fb0ea4d72747b3f5dcf260dcd345672.zip
Handle the case when a variable is only valid in part of the enclosing scope
DWARF stores this information in the DW_AT_start_scope attribute. This CL add support for this attribute and also changes the functions displaying frame variables to only display the variables currently in scope. Differential revision: http://reviews.llvm.org/D17449 llvm-svn: 261858
Diffstat (limited to 'lldb/source/Target/StackFrame.cpp')
-rw-r--r--lldb/source/Target/StackFrame.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Target/StackFrame.cpp b/lldb/source/Target/StackFrame.cpp
index 43ca4b3f97a..8a7356d3c9c 100644
--- a/lldb/source/Target/StackFrame.cpp
+++ b/lldb/source/Target/StackFrame.cpp
@@ -540,7 +540,11 @@ StackFrame::GetVariableList (bool get_file_globals)
const bool can_create = true;
const bool stop_if_child_block_is_inlined_function = true;
m_variable_list_sp.reset(new VariableList());
- frame_block->AppendBlockVariables(can_create, get_child_variables, stop_if_child_block_is_inlined_function, m_variable_list_sp.get());
+ frame_block->AppendBlockVariables(can_create,
+ get_child_variables,
+ stop_if_child_block_is_inlined_function,
+ [this](Variable* v) { return v->IsInScope(this); },
+ m_variable_list_sp.get());
}
}
@@ -584,6 +588,7 @@ 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); },
var_list_sp.get());
}
OpenPOWER on IntegriCloud