summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.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/gdb-remote/ProcessGDBRemote.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/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
index ef9a1dd8062..a6fdd8dd070 100644
--- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
@@ -3700,9 +3700,15 @@ bool ProcessGDBRemote::StartAsyncThread() {
// Create a thread that watches our internal state and controls which
// events make it to clients (into the DCProcess event queue).
- m_async_thread = ThreadLauncher::LaunchThread(
- "<lldb.process.gdb-remote.async>", ProcessGDBRemote::AsyncThread, this,
- nullptr);
+ llvm::Expected<HostThread> async_thread = ThreadLauncher::LaunchThread(
+ "<lldb.process.gdb-remote.async>", ProcessGDBRemote::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;
} else if (log)
log->Printf("ProcessGDBRemote::%s () - Called when Async thread was "
"already running.",
OpenPOWER on IntegriCloud