[Lldb-commits] [PATCH] D52247: Refactor FindVariable() core functionality into StackFrame out of SBFrame
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 18 15:06:18 PDT 2018
clayborg requested changes to this revision.
clayborg added inline comments.
This revision now requires changes to proceed.
================
Comment at: include/lldb/Target/StackFrame.h:506
+ lldb::ValueObjectSP FindVariable(const char *name);
+
----------------
davide wrote:
> Also, I think you might want to add a doxygen comment here, as this function is now part of the API.
Make this a "ConstString name" since we need that for lookup anyway? We couldn't do that in SBFrame cause we don't expose our constant strings outside the API, but internally we can use ConstString
================
Comment at: source/API/SBFrame.cpp:669
if (frame) {
- VariableList variable_list;
- SymbolContext sc(frame->GetSymbolContext(eSymbolContextBlock));
-
- if (sc.block) {
- const bool can_create = true;
- const bool get_parent_variables = true;
- const bool stop_if_block_is_inlined_function = true;
+ value_sp = frame->FindVariable(name);
----------------
```
value_sp = frame->FindVariable(ConstString(name));
```
================
Comment at: source/Target/StackFrame.cpp:1712
+lldb::ValueObjectSP StackFrame::FindVariable(const char *name) {
+ ValueObjectSP value_sp;
----------------
```
lldb::ValueObjectSP StackFrame::FindVariable(ConstString name) {
```
================
Comment at: source/Target/StackFrame.cpp:1737
+ &variable_list)) {
+ var_sp = variable_list.FindVariable(ConstString(name));
+ }
----------------
remove ConstString if we change parameter
https://reviews.llvm.org/D52247
More information about the lldb-commits
mailing list