summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-07-05 17:42:08 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-07-05 17:42:08 +0000
commitf39c2e188d811ede3758eb98aa0201c1c8f978a1 (patch)
treee8642eccc48fd93d723b35a66bfb7178ba297777 /lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
parent6e6d229e5e95b00964656ae1a555bc843e37926d (diff)
downloadbcm5719-llvm-f39c2e188d811ede3758eb98aa0201c1c8f978a1.tar.gz
bcm5719-llvm-f39c2e188d811ede3758eb98aa0201c1c8f978a1.zip
Change LaunchThread interface to return an expected.
Change the interface to return an expected, instead of taking a Status pointer. Differential revision: https://reviews.llvm.org/D64163 llvm-svn: 365226
Diffstat (limited to 'lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp')
-rw-r--r--lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index c9e024fc498..6f1bb4b6476 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -32,6 +32,7 @@
#include "lldb/Target/RegisterContext.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
+#include "lldb/Utility/Log.h"
#include "lldb/Utility/State.h"
#include "lldb/Utility/StringExtractor.h"
#include "lldb/Utility/UUID.h"
@@ -739,8 +740,15 @@ bool ProcessKDP::StartAsyncThread() {
if (m_async_thread.IsJoinable())
return true;
- m_async_thread = ThreadLauncher::LaunchThread(
- "<lldb.process.kdp-remote.async>", ProcessKDP::AsyncThread, this, NULL);
+ llvm::Expected<HostThread> async_thread = ThreadLauncher::LaunchThread(
+ "<lldb.process.kdp-remote.async>", ProcessKDP::AsyncThread, this);
+ if (!async_thread) {
+ LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST),
+ "failed to launch host thread: {}",
+ llvm::toString(async_thread.takeError()));
+ return false;
+ }
+ m_async_thread = *async_thread;
return m_async_thread.IsJoinable();
}
OpenPOWER on IntegriCloud