Avoid crash if we fail to resolve process in attach

llvm-svn: 185661
This commit is contained in:
Ed Maste 2013-07-04 18:25:34 +00:00
parent 17b31f3d43
commit be0b55d121
1 changed files with 2 additions and 3 deletions

View File

@ -135,6 +135,8 @@ ProcessPOSIX::DoAttachToProcessWithID(lldb::pid_t pid)
m_target.GetArchitecture(),
exe_module_sp,
executable_search_paths.GetSize() ? &executable_search_paths : NULL);
if (!error.Success())
return error;
// Fix the target architecture if necessary
const ArchSpec &module_arch = exe_module_sp->GetArchitecture();
@ -144,9 +146,6 @@ ProcessPOSIX::DoAttachToProcessWithID(lldb::pid_t pid)
// Initialize the target module list
m_target.SetExecutableModule (exe_module_sp, true);
if (!error.Success())
return error;
SetSTDIOFileDescriptor(m_monitor->GetTerminalFD());
SetID(pid);