[Lldb-commits] [lldb] r221647 - Fix error handling in NativeProcessLinux::AttachToInferior: http://reviews.llvm.org/D6158
Shawn Best
sbest at blueshiftinc.com
Mon Nov 10 16:28:52 PST 2014
Author: sbest
Date: Mon Nov 10 18:28:52 2014
New Revision: 221647
URL: http://llvm.org/viewvc/llvm-project?rev=221647&view=rev
Log:
Fix error handling in NativeProcessLinux::AttachToInferior: http://reviews.llvm.org/D6158
Modified:
lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp?rev=221647&r1=221646&r2=221647&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.cpp Mon Nov 10 18:28:52 2014
@@ -1428,11 +1428,18 @@ NativeProcessLinux::AttachToInferior (ll
if (log)
log->Printf ("NativeProcessLinux::%s (pid = %" PRIi64 "): no default platform set", __FUNCTION__, pid);
error.SetErrorString ("no default platform available");
+ return;
}
// Gather info about the process.
ProcessInstanceInfo process_info;
- platform_sp->GetProcessInfo (pid, process_info);
+ if (!platform_sp->GetProcessInfo (pid, process_info))
+ {
+ if (log)
+ log->Printf ("NativeProcessLinux::%s (pid = %" PRIi64 "): failed to get process info", __FUNCTION__, pid);
+ error.SetErrorString ("failed to get process info");
+ return;
+ }
// Resolve the executable module
ModuleSP exe_module_sp;
More information about the lldb-commits
mailing list