diff options
author | Ed Maste <emaste@freebsd.org> | 2013-07-04 18:25:34 +0000 |
---|---|---|
committer | Ed Maste <emaste@freebsd.org> | 2013-07-04 18:25:34 +0000 |
commit | be0b55d1211a4b38d1e130c3e76d2bbb847c7110 (patch) | |
tree | 71bdc2d4023f0d5cf75356681c76126b290b59cd /lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp | |
parent | 17b31f3d43baee73b12cc2213db1785c889728f5 (diff) | |
download | bcm5719-llvm-be0b55d1211a4b38d1e130c3e76d2bbb847c7110.tar.gz bcm5719-llvm-be0b55d1211a4b38d1e130c3e76d2bbb847c7110.zip |
Avoid crash if we fail to resolve process in attach
llvm-svn: 185661
Diffstat (limited to 'lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp index 4e8ed2f8a35..6f25585ad3f 100644 --- a/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp +++ b/lldb/source/Plugins/Process/POSIX/ProcessPOSIX.cpp @@ -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); |