本文整理汇总了C++中TargetSP::GetExecutableModule方法的典型用法代码示例。如果您正苦于以下问题:C++ TargetSP::GetExecutableModule方法的具体用法?C++ TargetSP::GetExecutableModule怎么用?C++ TargetSP::GetExecutableModule使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TargetSP
的用法示例。
在下文中一共展示了TargetSP::GetExecutableModule方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetID
void
ProcessWindowsLive::OnExitProcess(uint32_t exit_code)
{
// No need to acquire the lock since m_session_data isn't accessed.
WINLOG_IFALL(WINDOWS_LOG_PROCESS, "Process %u exited with code %u", GetID(), exit_code);
TargetSP target = m_target_sp.lock();
if (target)
{
ModuleSP executable_module = target->GetExecutableModule();
ModuleList unloaded_modules;
unloaded_modules.Append(executable_module);
target->ModulesDidUnload(unloaded_modules, true);
}
SetProcessExitStatus(nullptr, GetID(), true, 0, exit_code);
SetPrivateState(eStateExited);
}
示例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();
}