diff options
| author | Shawn Best <sbest@blueshiftinc.com> | 2014-11-11 00:28:52 +0000 |
|---|---|---|
| committer | Shawn Best <sbest@blueshiftinc.com> | 2014-11-11 00:28:52 +0000 |
| commit | 50d60be3ce72f8f1005895fa3e7d14ec1a1f385c (patch) | |
| tree | 3a449c605a28208145bf00d06cbe106204faae60 | |
| parent | e106102176f04b782e342bab8942a35febb6ab02 (diff) | |
| download | bcm5719-llvm-50d60be3ce72f8f1005895fa3e7d14ec1a1f385c.tar.gz bcm5719-llvm-50d60be3ce72f8f1005895fa3e7d14ec1a1f385c.zip | |
Fix error handling in NativeProcessLinux::AttachToInferior: http://reviews.llvm.org/D6158
llvm-svn: 221647
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index abda9baecdb..4c53346e9c7 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -1428,11 +1428,18 @@ NativeProcessLinux::AttachToInferior (lldb::pid_t pid, lldb_private::Error &erro 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; |

