================ @@ -1926,20 +1863,21 @@ SBValueList SBTarget::FindGlobalVariables(const char *name, SBValueList sb_value_list; - TargetSP target_sp(GetSP()); - if (name && target_sp) { - VariableList variable_list; - target_sp->GetImages().FindGlobalVariables(ConstString(name), max_matches, - variable_list); - if (!variable_list.Empty()) { - ExecutionContextScope *exe_scope = target_sp->GetProcessSP().get(); - if (exe_scope == nullptr) - exe_scope = target_sp.get(); - for (const VariableSP &var_sp : variable_list) { - lldb::ValueObjectSP valobj_sp( - ValueObjectVariable::Create(exe_scope, var_sp)); - if (valobj_sp) - sb_value_list.Append(SBValue(valobj_sp)); + if (TargetSP target_sp = GetSP()) { ---------------- labath wrote:
h https://github.com/llvm/llvm-project/pull/141284 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits