本文整理汇总了C++中lldb::SBError类的典型用法代码示例。如果您正苦于以下问题:C++ SBError类的具体用法?C++ SBError怎么用?C++ SBError使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SBError类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process_sp
bool
SBProcess::RemoteLaunch (char const **argv,
char const **envp,
const char *stdin_path,
const char *stdout_path,
const char *stderr_path,
const char *working_directory,
uint32_t launch_flags,
bool stop_at_entry,
lldb::SBError& error)
{
Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::RemoteLaunch (argv=%p, envp=%p, stdin=%s, stdout=%s, stderr=%s, working-dir=%s, launch_flags=0x%x, stop_at_entry=%i, &error (%p))...",
static_cast<void*>(m_opaque_wp.lock().get()),
static_cast<void*>(argv), static_cast<void*>(envp),
stdin_path ? stdin_path : "NULL",
stdout_path ? stdout_path : "NULL",
stderr_path ? stderr_path : "NULL",
working_directory ? working_directory : "NULL",
launch_flags, stop_at_entry,
static_cast<void*>(error.get()));
ProcessSP process_sp(GetSP());
if (process_sp)
{
Mutex::Locker api_locker (process_sp->GetTarget().GetAPIMutex());
if (process_sp->GetState() == eStateConnected)
{
if (stop_at_entry)
launch_flags |= eLaunchFlagStopAtEntry;
ProcessLaunchInfo launch_info(FileSpec{stdin_path, false},
FileSpec{stdout_path, false},
FileSpec{stderr_path, false},
FileSpec{working_directory, false},
launch_flags);
Module *exe_module = process_sp->GetTarget().GetExecutableModulePointer();
if (exe_module)
launch_info.SetExecutableFile(exe_module->GetPlatformFileSpec(), true);
if (argv)
launch_info.GetArguments().AppendArguments (argv);
if (envp)
launch_info.GetEnvironmentEntries ().SetArguments (envp);
error.SetError (process_sp->Launch (launch_info));
}
else
{
error.SetErrorString ("must be in eStateConnected to call RemoteLaunch");
}
}
else
{
error.SetErrorString ("unable to attach pid");
}
if (log) {
SBStream sstr;
error.GetDescription (sstr);
log->Printf ("SBProcess(%p)::RemoteLaunch (...) => SBError (%p): %s",
static_cast<void*>(process_sp.get()),
static_cast<void*>(error.get()), sstr.GetData());
}
return error.Success();
}