本文整理汇总了C++中TargetSP::GetImages方法的典型用法代码示例。如果您正苦于以下问题:C++ TargetSP::GetImages方法的具体用法?C++ TargetSP::GetImages怎么用?C++ TargetSP::GetImages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TargetSP
的用法示例。
在下文中一共展示了TargetSP::GetImages方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: const_typename
TypeSP
OperatingSystemGo::FindType(TargetSP target_sp, const char *name)
{
ConstString const_typename(name);
SymbolContext sc;
const bool exact_match = false;
const ModuleList &module_list = target_sp->GetImages();
size_t count = module_list.GetSize();
for (size_t idx = 0; idx < count; idx++)
{
ModuleSP module_sp(module_list.GetModuleAtIndex(idx));
if (module_sp)
{
TypeSP type_sp(module_sp->FindFirstType(sc, const_typename, exact_match));
if (type_sp)
return type_sp;
}
}
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OS));
if (log)
log->Printf("OperatingSystemGo::FindType(%s): not found", name);
return TypeSP();
}
示例2: LookupType
CompilerType LookupType(TargetSP target, ConstString name) {
if (!target)
return CompilerType();
SymbolContext sc;
TypeList type_list;
llvm::DenseSet<SymbolFile *> searched_symbol_files;
uint32_t num_matches = target->GetImages().FindTypes(
sc, name, false, 2, searched_symbol_files, type_list);
if (num_matches > 0) {
return type_list.GetTypeAtIndex(0)->GetFullCompilerType();
}
return CompilerType();
}
示例3: FindGlobalVariable
VariableSP FindGlobalVariable(TargetSP target, llvm::Twine name) {
ConstString fullname(name.str());
VariableList variable_list;
const bool append = true;
if (!target) {
return nullptr;
}
const uint32_t match_count = target->GetImages().FindGlobalVariables(
fullname, append, 1, variable_list);
if (match_count == 1) {
return variable_list.GetVariableAtIndex(0);
}
return nullptr;
}
示例4: Create
ValueObjectSP
OperatingSystemGo::FindGlobal(TargetSP target, const char *name)
{
VariableList variable_list;
const bool append = true;
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_OS));
if (log)
{
log->Printf("exe: %s", target->GetExecutableModule()->GetSpecificationDescription().c_str());
log->Printf("modules: %zu", target->GetImages().GetSize());
}
uint32_t match_count = target->GetImages().FindGlobalVariables(ConstString(name), append, 1, variable_list);
if (match_count > 0)
{
ExecutionContextScope *exe_scope = target->GetProcessSP().get();
if (exe_scope == NULL)
exe_scope = target.get();
return ValueObjectVariable::Create(exe_scope, variable_list.GetVariableAtIndex(0));
}
return ValueObjectSP();
}