本文整理汇总了C++中TargetSP::get方法的典型用法代码示例。如果您正苦于以下问题:C++ TargetSP::get方法的具体用法?C++ TargetSP::get怎么用?C++ TargetSP::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TargetSP
的用法示例。
在下文中一共展示了TargetSP::get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: locker
bool
TargetList::DeleteTarget (TargetSP &target_sp)
{
Mutex::Locker locker(m_target_list_mutex);
collection::iterator pos, end = m_target_list.end();
for (pos = m_target_list.begin(); pos != end; ++pos)
{
if (pos->get() == target_sp.get())
{
m_target_list.erase(pos);
return true;
}
}
return false;
}
示例2: 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();
}
示例3: scoped_timer
Error
TargetList::CreateTarget
(
Debugger &debugger,
const FileSpec& file,
const ArchSpec& arch,
const UUID *uuid_ptr,
bool get_dependent_files,
TargetSP &target_sp
)
{
Timer scoped_timer (__PRETTY_FUNCTION__,
"TargetList::CreateTarget (file = '%s/%s', arch = '%s', uuid = %p)",
file.GetDirectory().AsCString(),
file.GetFilename().AsCString(),
arch.AsCString(),
uuid_ptr);
ModuleSP exe_module_sp;
FileSpec resolved_file(file);
if (!Host::ResolveExecutableInBundle (&resolved_file))
resolved_file = file;
Error error = ModuleList::GetSharedModule(resolved_file,
arch,
uuid_ptr,
NULL,
0,
exe_module_sp,
NULL,
NULL);
if (exe_module_sp)
{
target_sp.reset(new Target(debugger));
target_sp->SetExecutableModule (exe_module_sp, get_dependent_files);
if (target_sp.get())
{
Mutex::Locker locker(m_target_list_mutex);
m_current_target_idx = m_target_list.size();
m_target_list.push_back(target_sp);
}
// target_sp.reset(new Target);
// // Let the target resolve any funky bundle paths before we try and get
// // the object file...
// target_sp->SetExecutableModule (exe_module_sp, get_dependent_files);
// if (exe_module_sp->GetObjectFile() == NULL)
// {
// error.SetErrorStringWithFormat("%s%s%s: doesn't contain architecture %s",
// file.GetDirectory().AsCString(),
// file.GetDirectory() ? "/" : "",
// file.GetFilename().AsCString(),
// arch.AsCString());
// }
// else
// {
// if (target_sp.get())
// {
// error.Clear();
// Mutex::Locker locker(m_target_list_mutex);
// m_current_target_idx = m_target_list.size();
// m_target_list.push_back(target_sp);
// }
// }
}
else
{
target_sp.reset();
}
return error;
}