diff options
author | Stella Stamenova <stilis@microsoft.com> | 2019-07-09 18:10:36 +0000 |
---|---|---|
committer | Stella Stamenova <stilis@microsoft.com> | 2019-07-09 18:10:36 +0000 |
commit | 631b5f7dc0e9dab76355f8043b03727b0cb7d62d (patch) | |
tree | e950d763ed3207efedea9ab40db6bd65b743d3c6 /lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp | |
parent | 22b2c3d6511dcd903a08ebcf65689c59b164d419 (diff) | |
download | bcm5719-llvm-631b5f7dc0e9dab76355f8043b03727b0cb7d62d.tar.gz bcm5719-llvm-631b5f7dc0e9dab76355f8043b03727b0cb7d62d.zip |
[lldb, windows] Update two more locations that use LaunchThread to the new function signature
llvm-svn: 365526
Diffstat (limited to 'lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp index 104ac229f2f..58769bdd70d 100644 --- a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp @@ -63,16 +63,18 @@ Status DebuggerThread::DebugLaunch(const ProcessLaunchInfo &launch_info) { Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS); LLDB_LOG(log, "launching '{0}'", launch_info.GetExecutableFile().GetPath()); - Status error; + Status result; DebugLaunchContext *context = new DebugLaunchContext(this, launch_info); - HostThread slave_thread(ThreadLauncher::LaunchThread( - "lldb.plugin.process-windows.slave[?]", DebuggerThreadLaunchRoutine, - context, &error)); - if (!error.Success()) - LLDB_LOG(log, "couldn't launch debugger thread. {0}", error); + llvm::Expected<HostThread> slave_thread = ThreadLauncher::LaunchThread( + "lldb.plugin.process-windows.slave[?]", DebuggerThreadLaunchRoutine, + context); + if (!slave_thread) { + result = Status(slave_thread.takeError()); + LLDB_LOG(log, "couldn't launch debugger thread. {0}", result); + } - return error; + return result; } Status DebuggerThread::DebugAttach(lldb::pid_t pid, @@ -80,16 +82,18 @@ Status DebuggerThread::DebugAttach(lldb::pid_t pid, Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS); LLDB_LOG(log, "attaching to '{0}'", pid); - Status error; + Status result; DebugAttachContext *context = new DebugAttachContext(this, pid, attach_info); - HostThread slave_thread(ThreadLauncher::LaunchThread( - "lldb.plugin.process-windows.slave[?]", DebuggerThreadAttachRoutine, - context, &error)); - if (!error.Success()) - LLDB_LOG(log, "couldn't attach to process '{0}'. {1}", pid, error); + llvm::Expected<HostThread> slave_thread = ThreadLauncher::LaunchThread( + "lldb.plugin.process-windows.slave[?]", DebuggerThreadAttachRoutine, + context); + if (!slave_thread) { + result = Status(slave_thread.takeError()); + LLDB_LOG(log, "couldn't attach to process '{0}'. {1}", pid, result); + } - return error; + return result; } lldb::thread_result_t DebuggerThread::DebuggerThreadLaunchRoutine(void *data) { |