diff options
author | Tamas Berghammer <tberghammer@google.com> | 2016-02-25 12:23:37 +0000 |
---|---|---|
committer | Tamas Berghammer <tberghammer@google.com> | 2016-02-25 12:23:37 +0000 |
commit | 72ac8a840fb0ea4d72747b3f5dcf260dcd345672 (patch) | |
tree | c003572a6478540b2666c0ddcb6b807f57677a8a /lldb/source/API/SBFrame.cpp | |
parent | 2e4c72977c9bf06a8dbe7688d8cb3b66c8912037 (diff) | |
download | bcm5719-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/API/SBFrame.cpp')
-rw-r--r-- | lldb/source/API/SBFrame.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/API/SBFrame.cpp b/lldb/source/API/SBFrame.cpp index 6a36ae6fadc..d53eb27344b 100644 --- a/lldb/source/API/SBFrame.cpp +++ b/lldb/source/API/SBFrame.cpp @@ -789,9 +789,10 @@ SBFrame::FindVariable (const char *name, lldb::DynamicValueType use_dynamic) const bool get_parent_variables = true; const bool stop_if_block_is_inlined_function = true; - if (sc.block->AppendVariables (can_create, + if (sc.block->AppendVariables (can_create, get_parent_variables, stop_if_block_is_inlined_function, + [frame](Variable* v) { return v->IsInScope(frame); }, &variable_list)) { var_sp = variable_list.FindVariable (ConstString(name)); @@ -887,6 +888,7 @@ SBFrame::FindValue (const char *name, ValueType value_type, lldb::DynamicValueTy sc.block->AppendVariables(can_create, get_parent_variables, stop_if_block_is_inlined_function, + [frame](Variable* v) { return v->IsInScope(frame); }, &variable_list); if (value_type == eValueTypeVariableGlobal) { |