Alexander Shaposhnikov | 696bd63 | 2016-11-26 05:23:44 +0000 | [diff] [blame] | 1 | //===-- DebuggerThread.cpp --------------------------------------*- C++ -*-===// |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "DebuggerThread.h" |
Zachary Turner | dcd8037 | 2014-11-11 00:00:14 +0000 | [diff] [blame] | 11 | #include "ExceptionRecord.h" |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 12 | #include "IDebugDelegate.h" |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 13 | |
Zachary Turner | a32d2ce | 2014-11-12 19:31:56 +0000 | [diff] [blame] | 14 | #include "lldb/Core/ModuleSpec.h" |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 15 | #include "lldb/Host/ThreadLauncher.h" |
| 16 | #include "lldb/Host/windows/HostProcessWindows.h" |
| 17 | #include "lldb/Host/windows/HostThreadWindows.h" |
| 18 | #include "lldb/Host/windows/ProcessLauncherWindows.h" |
Zachary Turner | c62733b | 2015-05-20 18:31:17 +0000 | [diff] [blame] | 19 | #include "lldb/Target/Process.h" |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 20 | #include "lldb/Target/ProcessLaunchInfo.h" |
Zachary Turner | 5713a05 | 2017-03-22 18:40:07 +0000 | [diff] [blame] | 21 | #include "lldb/Utility/FileSpec.h" |
Zachary Turner | 6f9e690 | 2017-03-03 20:56:28 +0000 | [diff] [blame] | 22 | #include "lldb/Utility/Log.h" |
Raphael Isemann | 7fae493 | 2018-08-30 17:51:10 +0000 | [diff] [blame^] | 23 | #include "lldb/Utility/Predicate.h" |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 24 | #include "lldb/Utility/Status.h" |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 25 | |
Adrian McCarthy | 18a9135d | 2015-10-28 18:21:45 +0000 | [diff] [blame] | 26 | #include "Plugins/Process/Windows/Common/ProcessWindowsLog.h" |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 27 | |
Zachary Turner | a32d2ce | 2014-11-12 19:31:56 +0000 | [diff] [blame] | 28 | #include "llvm/ADT/STLExtras.h" |
Zachary Turner | 190fadc | 2016-03-22 17:58:09 +0000 | [diff] [blame] | 29 | #include "llvm/Support/ConvertUTF.h" |
Zachary Turner | ed96be9 | 2017-03-04 01:31:06 +0000 | [diff] [blame] | 30 | #include "llvm/Support/Threading.h" |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 31 | #include "llvm/Support/raw_ostream.h" |
| 32 | |
| 33 | using namespace lldb; |
| 34 | using namespace lldb_private; |
| 35 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 36 | namespace { |
| 37 | struct DebugLaunchContext { |
| 38 | DebugLaunchContext(DebuggerThread *thread, |
| 39 | const ProcessLaunchInfo &launch_info) |
| 40 | : m_thread(thread), m_launch_info(launch_info) {} |
| 41 | DebuggerThread *m_thread; |
| 42 | ProcessLaunchInfo m_launch_info; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 43 | }; |
Zachary Turner | c62733b | 2015-05-20 18:31:17 +0000 | [diff] [blame] | 44 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 45 | struct DebugAttachContext { |
| 46 | DebugAttachContext(DebuggerThread *thread, lldb::pid_t pid, |
| 47 | const ProcessAttachInfo &attach_info) |
| 48 | : m_thread(thread), m_pid(pid), m_attach_info(attach_info) {} |
| 49 | DebuggerThread *m_thread; |
| 50 | lldb::pid_t m_pid; |
| 51 | ProcessAttachInfo m_attach_info; |
Zachary Turner | c62733b | 2015-05-20 18:31:17 +0000 | [diff] [blame] | 52 | }; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | DebuggerThread::DebuggerThread(DebugDelegateSP debug_delegate) |
Zachary Turner | 5a8ad459 | 2016-10-05 17:07:34 +0000 | [diff] [blame] | 56 | : m_debug_delegate(debug_delegate), m_pid_to_detach(0), |
| 57 | m_is_shutting_down(false) { |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 58 | m_debugging_ended_event = ::CreateEvent(nullptr, TRUE, FALSE, nullptr); |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 59 | } |
| 60 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 61 | DebuggerThread::~DebuggerThread() { ::CloseHandle(m_debugging_ended_event); } |
| 62 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 63 | Status DebuggerThread::DebugLaunch(const ProcessLaunchInfo &launch_info) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 64 | Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS); |
| 65 | LLDB_LOG(log, "launching '{0}'", launch_info.GetExecutableFile().GetPath()); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 66 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 67 | Status error; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 68 | DebugLaunchContext *context = new DebugLaunchContext(this, launch_info); |
| 69 | HostThread slave_thread(ThreadLauncher::LaunchThread( |
| 70 | "lldb.plugin.process-windows.slave[?]", DebuggerThreadLaunchRoutine, |
| 71 | context, &error)); |
| 72 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 73 | if (!error.Success()) |
| 74 | LLDB_LOG(log, "couldn't launch debugger thread. {0}", error); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 75 | |
| 76 | return error; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 77 | } |
| 78 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 79 | Status DebuggerThread::DebugAttach(lldb::pid_t pid, |
| 80 | const ProcessAttachInfo &attach_info) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 81 | Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS); |
| 82 | LLDB_LOG(log, "attaching to '{0}'", pid); |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 83 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 84 | Status error; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 85 | DebugAttachContext *context = new DebugAttachContext(this, pid, attach_info); |
| 86 | HostThread slave_thread(ThreadLauncher::LaunchThread( |
| 87 | "lldb.plugin.process-windows.slave[?]", DebuggerThreadAttachRoutine, |
| 88 | context, &error)); |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 89 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 90 | if (!error.Success()) |
| 91 | LLDB_LOG(log, "couldn't attach to process '{0}'. {1}", pid, error); |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 92 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 93 | return error; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 94 | } |
| 95 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 96 | lldb::thread_result_t DebuggerThread::DebuggerThreadLaunchRoutine(void *data) { |
| 97 | DebugLaunchContext *context = static_cast<DebugLaunchContext *>(data); |
| 98 | lldb::thread_result_t result = |
| 99 | context->m_thread->DebuggerThreadLaunchRoutine(context->m_launch_info); |
| 100 | delete context; |
| 101 | return result; |
Zachary Turner | c62733b | 2015-05-20 18:31:17 +0000 | [diff] [blame] | 102 | } |
| 103 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 104 | lldb::thread_result_t DebuggerThread::DebuggerThreadAttachRoutine(void *data) { |
| 105 | DebugAttachContext *context = static_cast<DebugAttachContext *>(data); |
| 106 | lldb::thread_result_t result = context->m_thread->DebuggerThreadAttachRoutine( |
| 107 | context->m_pid, context->m_attach_info); |
| 108 | delete context; |
| 109 | return result; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 110 | } |
| 111 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 112 | lldb::thread_result_t DebuggerThread::DebuggerThreadLaunchRoutine( |
| 113 | const ProcessLaunchInfo &launch_info) { |
| 114 | // Grab a shared_ptr reference to this so that we know it won't get deleted |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 115 | // until after the thread routine has exited. |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 116 | std::shared_ptr<DebuggerThread> this_ref(shared_from_this()); |
Zachary Turner | c62733b | 2015-05-20 18:31:17 +0000 | [diff] [blame] | 117 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 118 | Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS); |
| 119 | LLDB_LOG(log, "preparing to launch '{0}' on background thread.", |
| 120 | launch_info.GetExecutableFile().GetPath()); |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 121 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 122 | Status error; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 123 | ProcessLauncherWindows launcher; |
| 124 | HostProcess process(launcher.LaunchProcess(launch_info, error)); |
| 125 | // If we couldn't create the process, notify waiters immediately. Otherwise |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 126 | // enter the debug loop and wait until we get the create process debug |
| 127 | // notification. Note that if the process was created successfully, we can |
| 128 | // throw away the process handle we got from CreateProcess because Windows |
| 129 | // will give us another (potentially more useful?) handle when it sends us |
| 130 | // the CREATE_PROCESS_DEBUG_EVENT. |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 131 | if (error.Success()) |
Zachary Turner | c62733b | 2015-05-20 18:31:17 +0000 | [diff] [blame] | 132 | DebugLoop(); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 133 | else |
| 134 | m_debug_delegate->OnDebuggerError(error, 0); |
Zachary Turner | c62733b | 2015-05-20 18:31:17 +0000 | [diff] [blame] | 135 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 136 | return 0; |
| 137 | } |
| 138 | |
| 139 | lldb::thread_result_t DebuggerThread::DebuggerThreadAttachRoutine( |
| 140 | lldb::pid_t pid, const ProcessAttachInfo &attach_info) { |
| 141 | // Grab a shared_ptr reference to this so that we know it won't get deleted |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 142 | // until after the thread routine has exited. |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 143 | std::shared_ptr<DebuggerThread> this_ref(shared_from_this()); |
| 144 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 145 | Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS); |
| 146 | LLDB_LOG(log, "preparing to attach to process '{0}' on background thread.", |
| 147 | pid); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 148 | |
| 149 | if (!DebugActiveProcess((DWORD)pid)) { |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 150 | Status error(::GetLastError(), eErrorTypeWin32); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 151 | m_debug_delegate->OnDebuggerError(error, 0); |
Zachary Turner | c62733b | 2015-05-20 18:31:17 +0000 | [diff] [blame] | 152 | return 0; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 153 | } |
| 154 | |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 155 | // The attach was successful, enter the debug loop. From here on out, this |
| 156 | // is no different than a create process operation, so all the same comments |
| 157 | // in DebugLaunch should apply from this point out. |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 158 | DebugLoop(); |
| 159 | |
| 160 | return 0; |
Zachary Turner | c62733b | 2015-05-20 18:31:17 +0000 | [diff] [blame] | 161 | } |
| 162 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 163 | Status DebuggerThread::StopDebugging(bool terminate) { |
| 164 | Status error; |
Zachary Turner | c6a6653 | 2014-12-03 22:04:18 +0000 | [diff] [blame] | 165 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 166 | lldb::pid_t pid = m_process.GetProcessId(); |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 167 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 168 | Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS); |
| 169 | LLDB_LOG(log, "terminate = {0}, inferior={1}.", terminate, pid); |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 170 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 171 | // Set m_is_shutting_down to true if it was false. Return if it was already |
| 172 | // true. |
| 173 | bool expected = false; |
| 174 | if (!m_is_shutting_down.compare_exchange_strong(expected, true)) |
Zachary Turner | c6a6653 | 2014-12-03 22:04:18 +0000 | [diff] [blame] | 175 | return error; |
Zachary Turner | c6a6653 | 2014-12-03 22:04:18 +0000 | [diff] [blame] | 176 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 177 | // Make a copy of the process, since the termination sequence will reset |
| 178 | // DebuggerThread's internal copy and it needs to remain open for the Wait |
| 179 | // operation. |
| 180 | HostProcess process_copy = m_process; |
| 181 | lldb::process_t handle = m_process.GetNativeProcess().GetSystemHandle(); |
Zachary Turner | c6a6653 | 2014-12-03 22:04:18 +0000 | [diff] [blame] | 182 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 183 | if (terminate) { |
Stella Stamenova | 9d6fabf | 2018-06-13 19:02:44 +0000 | [diff] [blame] | 184 | if (handle != nullptr && handle != LLDB_INVALID_PROCESS) { |
| 185 | // Initiate the termination before continuing the exception, so that the |
| 186 | // next debug event we get is the exit process event, and not some other |
| 187 | // event. |
| 188 | BOOL terminate_suceeded = TerminateProcess(handle, 0); |
| 189 | LLDB_LOG(log, |
| 190 | "calling TerminateProcess({0}, 0) (inferior={1}), success={2}", |
| 191 | handle, pid, terminate_suceeded); |
| 192 | } else { |
| 193 | LLDB_LOG(log, |
| 194 | "NOT calling TerminateProcess because the inferior is not valid ({0}, 0) (inferior={1})", |
| 195 | handle, pid); |
| 196 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 197 | } |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 198 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 199 | // If we're stuck waiting for an exception to continue (e.g. the user is at a |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 200 | // breakpoint messing around in the debugger), continue it now. But only |
| 201 | // AFTER calling TerminateProcess to make sure that the very next call to |
| 202 | // WaitForDebugEvent is an exit process event. |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 203 | if (m_active_exception.get()) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 204 | LLDB_LOG(log, "masking active exception"); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 205 | ContinueAsyncException(ExceptionResult::MaskException); |
| 206 | } |
| 207 | |
| 208 | if (!terminate) { |
| 209 | // Indicate that we want to detach. |
| 210 | m_pid_to_detach = GetProcess().GetProcessId(); |
| 211 | |
| 212 | // Force a fresh break so that the detach can happen from the debugger |
| 213 | // thread. |
| 214 | if (!::DebugBreakProcess( |
| 215 | GetProcess().GetNativeProcess().GetSystemHandle())) { |
| 216 | error.SetError(::GetLastError(), eErrorTypeWin32); |
Zachary Turner | c6a6653 | 2014-12-03 22:04:18 +0000 | [diff] [blame] | 217 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 218 | } |
| 219 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 220 | LLDB_LOG(log, "waiting for detach from process {0} to complete.", pid); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 221 | |
| 222 | DWORD wait_result = WaitForSingleObject(m_debugging_ended_event, 5000); |
| 223 | if (wait_result != WAIT_OBJECT_0) { |
| 224 | error.SetError(GetLastError(), eErrorTypeWin32); |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 225 | LLDB_LOG(log, "error: WaitForSingleObject({0}, 5000) returned {1}", |
| 226 | m_debugging_ended_event, wait_result); |
| 227 | } else |
| 228 | LLDB_LOG(log, "detach from process {0} completed successfully.", pid); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 229 | |
| 230 | if (!error.Success()) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 231 | LLDB_LOG(log, "encountered an error while trying to stop process {0}. {1}", |
| 232 | pid, error); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 233 | } |
| 234 | return error; |
Zachary Turner | dcd8037 | 2014-11-11 00:00:14 +0000 | [diff] [blame] | 235 | } |
| 236 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 237 | void DebuggerThread::ContinueAsyncException(ExceptionResult result) { |
| 238 | if (!m_active_exception.get()) |
| 239 | return; |
Zachary Turner | dcd8037 | 2014-11-11 00:00:14 +0000 | [diff] [blame] | 240 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 241 | Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_PROCESS | |
| 242 | WINDOWS_LOG_EXCEPTION); |
| 243 | LLDB_LOG(log, "broadcasting for inferior process {0}.", |
| 244 | m_process.GetProcessId()); |
Zachary Turner | 6c3c0ed | 2015-10-02 22:47:04 +0000 | [diff] [blame] | 245 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 246 | m_active_exception.reset(); |
| 247 | m_exception_pred.SetValue(result, eBroadcastAlways); |
| 248 | } |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 249 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 250 | void DebuggerThread::FreeProcessHandles() { |
| 251 | m_process = HostProcess(); |
| 252 | m_main_thread = HostThread(); |
| 253 | if (m_image_file) { |
| 254 | ::CloseHandle(m_image_file); |
| 255 | m_image_file = nullptr; |
| 256 | } |
| 257 | } |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 258 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 259 | void DebuggerThread::DebugLoop() { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 260 | Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EVENT); |
Zachary Turner | 5a8ad459 | 2016-10-05 17:07:34 +0000 | [diff] [blame] | 261 | DEBUG_EVENT dbe = {}; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 262 | bool should_debug = true; |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 263 | LLDB_LOGV(log, "Entering WaitForDebugEvent loop"); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 264 | while (should_debug) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 265 | LLDB_LOGV(log, "Calling WaitForDebugEvent"); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 266 | BOOL wait_result = WaitForDebugEvent(&dbe, INFINITE); |
| 267 | if (wait_result) { |
| 268 | DWORD continue_status = DBG_CONTINUE; |
| 269 | switch (dbe.dwDebugEventCode) { |
| 270 | case EXCEPTION_DEBUG_EVENT: { |
| 271 | ExceptionResult status = |
| 272 | HandleExceptionEvent(dbe.u.Exception, dbe.dwThreadId); |
Adrian McCarthy | a59a721 | 2015-06-19 18:26:53 +0000 | [diff] [blame] | 273 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 274 | if (status == ExceptionResult::MaskException) |
| 275 | continue_status = DBG_CONTINUE; |
| 276 | else if (status == ExceptionResult::SendToApplication) |
| 277 | continue_status = DBG_EXCEPTION_NOT_HANDLED; |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 278 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 279 | break; |
| 280 | } |
| 281 | case CREATE_THREAD_DEBUG_EVENT: |
| 282 | continue_status = |
| 283 | HandleCreateThreadEvent(dbe.u.CreateThread, dbe.dwThreadId); |
| 284 | break; |
| 285 | case CREATE_PROCESS_DEBUG_EVENT: |
| 286 | continue_status = |
| 287 | HandleCreateProcessEvent(dbe.u.CreateProcessInfo, dbe.dwThreadId); |
| 288 | break; |
| 289 | case EXIT_THREAD_DEBUG_EVENT: |
| 290 | continue_status = |
| 291 | HandleExitThreadEvent(dbe.u.ExitThread, dbe.dwThreadId); |
| 292 | break; |
| 293 | case EXIT_PROCESS_DEBUG_EVENT: |
| 294 | continue_status = |
| 295 | HandleExitProcessEvent(dbe.u.ExitProcess, dbe.dwThreadId); |
| 296 | should_debug = false; |
| 297 | break; |
| 298 | case LOAD_DLL_DEBUG_EVENT: |
| 299 | continue_status = HandleLoadDllEvent(dbe.u.LoadDll, dbe.dwThreadId); |
| 300 | break; |
| 301 | case UNLOAD_DLL_DEBUG_EVENT: |
| 302 | continue_status = HandleUnloadDllEvent(dbe.u.UnloadDll, dbe.dwThreadId); |
| 303 | break; |
| 304 | case OUTPUT_DEBUG_STRING_EVENT: |
| 305 | continue_status = HandleODSEvent(dbe.u.DebugString, dbe.dwThreadId); |
| 306 | break; |
| 307 | case RIP_EVENT: |
| 308 | continue_status = HandleRipEvent(dbe.u.RipInfo, dbe.dwThreadId); |
| 309 | if (dbe.u.RipInfo.dwType == SLE_ERROR) |
| 310 | should_debug = false; |
| 311 | break; |
| 312 | } |
| 313 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 314 | LLDB_LOGV(log, "calling ContinueDebugEvent({0}, {1}, {2}) on thread {3}.", |
| 315 | dbe.dwProcessId, dbe.dwThreadId, continue_status, |
| 316 | ::GetCurrentThreadId()); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 317 | |
| 318 | ::ContinueDebugEvent(dbe.dwProcessId, dbe.dwThreadId, continue_status); |
| 319 | |
| 320 | if (m_detached) { |
| 321 | should_debug = false; |
| 322 | } |
| 323 | } else { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 324 | LLDB_LOG(log, "returned FALSE from WaitForDebugEvent. Error = {0}", |
| 325 | ::GetLastError()); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 326 | |
| 327 | should_debug = false; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 328 | } |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 329 | } |
| 330 | FreeProcessHandles(); |
Zachary Turner | 3c1c5b9 | 2015-05-21 19:56:26 +0000 | [diff] [blame] | 331 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 332 | LLDB_LOG(log, "WaitForDebugEvent loop completed, exiting."); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 333 | SetEvent(m_debugging_ended_event); |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 334 | } |
| 335 | |
Zachary Turner | dcd8037 | 2014-11-11 00:00:14 +0000 | [diff] [blame] | 336 | ExceptionResult |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 337 | DebuggerThread::HandleExceptionEvent(const EXCEPTION_DEBUG_INFO &info, |
| 338 | DWORD thread_id) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 339 | Log *log = |
| 340 | ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EVENT | WINDOWS_LOG_EXCEPTION); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 341 | if (m_is_shutting_down) { |
| 342 | // A breakpoint that occurs while `m_pid_to_detach` is non-zero is a magic |
| 343 | // exception that |
| 344 | // we use simply to wake up the DebuggerThread so that we can close out the |
| 345 | // debug loop. |
| 346 | if (m_pid_to_detach != 0 && |
| 347 | info.ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 348 | LLDB_LOG(log, "Breakpoint exception is cue to detach from process {0:x}", |
| 349 | m_pid_to_detach.load()); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 350 | ::DebugActiveProcessStop(m_pid_to_detach); |
| 351 | m_detached = true; |
Zachary Turner | 6c3c0ed | 2015-10-02 22:47:04 +0000 | [diff] [blame] | 352 | } |
| 353 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 354 | // Don't perform any blocking operations while we're shutting down. That |
Adrian Prantl | 0509724 | 2018-04-30 16:49:04 +0000 | [diff] [blame] | 355 | // will cause TerminateProcess -> WaitForSingleObject to time out. |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 356 | return ExceptionResult::SendToApplication; |
| 357 | } |
Zachary Turner | c6a6653 | 2014-12-03 22:04:18 +0000 | [diff] [blame] | 358 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 359 | bool first_chance = (info.dwFirstChance != 0); |
Zachary Turner | c6a6653 | 2014-12-03 22:04:18 +0000 | [diff] [blame] | 360 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 361 | m_active_exception.reset( |
| 362 | new ExceptionRecord(info.ExceptionRecord, thread_id)); |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 363 | LLDB_LOG(log, "encountered {0} chance exception {1:x} on thread {2:x}", |
| 364 | first_chance ? "first" : "second", |
| 365 | info.ExceptionRecord.ExceptionCode, thread_id); |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 366 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 367 | ExceptionResult result = |
| 368 | m_debug_delegate->OnDebugException(first_chance, *m_active_exception); |
| 369 | m_exception_pred.SetValue(result, eBroadcastNever); |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 370 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 371 | LLDB_LOG(log, "waiting for ExceptionPred != BreakInDebugger"); |
Pavel Labath | 4b13033 | 2018-05-09 14:49:43 +0000 | [diff] [blame] | 372 | result = *m_exception_pred.WaitForValueNotEqualTo( |
| 373 | ExceptionResult::BreakInDebugger); |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 374 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 375 | LLDB_LOG(log, "got ExceptionPred = {0}", (int)m_exception_pred.GetValue()); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 376 | return result; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 377 | } |
| 378 | |
| 379 | DWORD |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 380 | DebuggerThread::HandleCreateThreadEvent(const CREATE_THREAD_DEBUG_INFO &info, |
| 381 | DWORD thread_id) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 382 | Log *log = |
| 383 | ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EVENT | WINDOWS_LOG_THREAD); |
| 384 | LLDB_LOG(log, "Thread {0:x} spawned in process {1}", thread_id, |
| 385 | m_process.GetProcessId()); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 386 | HostThread thread(info.hThread); |
| 387 | thread.GetNativeThread().SetOwnsHandle(false); |
| 388 | m_debug_delegate->OnCreateThread(thread); |
| 389 | return DBG_CONTINUE; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 390 | } |
| 391 | |
| 392 | DWORD |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 393 | DebuggerThread::HandleCreateProcessEvent(const CREATE_PROCESS_DEBUG_INFO &info, |
| 394 | DWORD thread_id) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 395 | Log *log = |
| 396 | ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EVENT | WINDOWS_LOG_PROCESS); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 397 | uint32_t process_id = ::GetProcessId(info.hProcess); |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 398 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 399 | LLDB_LOG(log, "process {0} spawned", process_id); |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 400 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 401 | std::string thread_name; |
| 402 | llvm::raw_string_ostream name_stream(thread_name); |
| 403 | name_stream << "lldb.plugin.process-windows.slave[" << process_id << "]"; |
| 404 | name_stream.flush(); |
Zachary Turner | ed96be9 | 2017-03-04 01:31:06 +0000 | [diff] [blame] | 405 | llvm::set_thread_name(thread_name); |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 406 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 407 | // info.hProcess and info.hThread are closed automatically by Windows when |
| 408 | // EXIT_PROCESS_DEBUG_EVENT is received. |
| 409 | m_process = HostProcess(info.hProcess); |
| 410 | ((HostProcessWindows &)m_process.GetNativeProcess()).SetOwnsHandle(false); |
| 411 | m_main_thread = HostThread(info.hThread); |
| 412 | m_main_thread.GetNativeThread().SetOwnsHandle(false); |
| 413 | m_image_file = info.hFile; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 414 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 415 | lldb::addr_t load_addr = reinterpret_cast<lldb::addr_t>(info.lpBaseOfImage); |
| 416 | m_debug_delegate->OnDebuggerConnected(load_addr); |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 417 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 418 | return DBG_CONTINUE; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 419 | } |
| 420 | |
| 421 | DWORD |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 422 | DebuggerThread::HandleExitThreadEvent(const EXIT_THREAD_DEBUG_INFO &info, |
| 423 | DWORD thread_id) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 424 | Log *log = |
| 425 | ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EVENT | WINDOWS_LOG_THREAD); |
| 426 | LLDB_LOG(log, "Thread {0} exited with code {1} in process {2}", thread_id, |
| 427 | info.dwExitCode, m_process.GetProcessId()); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 428 | m_debug_delegate->OnExitThread(thread_id, info.dwExitCode); |
| 429 | return DBG_CONTINUE; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 430 | } |
| 431 | |
| 432 | DWORD |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 433 | DebuggerThread::HandleExitProcessEvent(const EXIT_PROCESS_DEBUG_INFO &info, |
| 434 | DWORD thread_id) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 435 | Log *log = |
| 436 | ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EVENT | WINDOWS_LOG_THREAD); |
| 437 | LLDB_LOG(log, "process {0} exited with code {1}", m_process.GetProcessId(), |
| 438 | info.dwExitCode); |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 439 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 440 | m_debug_delegate->OnExitProcess(info.dwExitCode); |
Adrian McCarthy | 2f8e4c3 | 2015-05-18 23:24:32 +0000 | [diff] [blame] | 441 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 442 | FreeProcessHandles(); |
| 443 | return DBG_CONTINUE; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 444 | } |
| 445 | |
| 446 | DWORD |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 447 | DebuggerThread::HandleLoadDllEvent(const LOAD_DLL_DEBUG_INFO &info, |
| 448 | DWORD thread_id) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 449 | Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EVENT); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 450 | if (info.hFile == nullptr) { |
| 451 | // Not sure what this is, so just ignore it. |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 452 | LLDB_LOG(log, "Warning: Inferior {0} has a NULL file handle, returning...", |
| 453 | m_process.GetProcessId()); |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 454 | return DBG_CONTINUE; |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 455 | } |
| 456 | |
| 457 | std::vector<wchar_t> buffer(1); |
| 458 | DWORD required_size = |
| 459 | GetFinalPathNameByHandleW(info.hFile, &buffer[0], 0, VOLUME_NAME_DOS); |
| 460 | if (required_size > 0) { |
| 461 | buffer.resize(required_size + 1); |
| 462 | required_size = GetFinalPathNameByHandleW(info.hFile, &buffer[0], |
| 463 | required_size, VOLUME_NAME_DOS); |
| 464 | std::string path_str_utf8; |
| 465 | llvm::convertWideToUTF8(buffer.data(), path_str_utf8); |
| 466 | llvm::StringRef path_str = path_str_utf8; |
| 467 | const char *path = path_str.data(); |
| 468 | if (path_str.startswith("\\\\?\\")) |
| 469 | path += 4; |
| 470 | |
| 471 | FileSpec file_spec(path, false); |
| 472 | ModuleSpec module_spec(file_spec); |
| 473 | lldb::addr_t load_addr = reinterpret_cast<lldb::addr_t>(info.lpBaseOfDll); |
| 474 | |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 475 | LLDB_LOG(log, "Inferior {0} - DLL '{1}' loaded at address {2:x}...", |
| 476 | m_process.GetProcessId(), path, info.lpBaseOfDll); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 477 | |
| 478 | m_debug_delegate->OnLoadDll(module_spec, load_addr); |
| 479 | } else { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 480 | LLDB_LOG( |
| 481 | log, |
| 482 | "Inferior {0} - Error {1} occurred calling GetFinalPathNameByHandle", |
| 483 | m_process.GetProcessId(), ::GetLastError()); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 484 | } |
| 485 | // Windows does not automatically close info.hFile, so we need to do it. |
| 486 | ::CloseHandle(info.hFile); |
| 487 | return DBG_CONTINUE; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 488 | } |
| 489 | |
| 490 | DWORD |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 491 | DebuggerThread::HandleUnloadDllEvent(const UNLOAD_DLL_DEBUG_INFO &info, |
| 492 | DWORD thread_id) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 493 | Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EVENT); |
| 494 | LLDB_LOG(log, "process {0} unloading DLL at addr {1:x}.", |
| 495 | m_process.GetProcessId(), info.lpBaseOfDll); |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 496 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 497 | m_debug_delegate->OnUnloadDll( |
| 498 | reinterpret_cast<lldb::addr_t>(info.lpBaseOfDll)); |
| 499 | return DBG_CONTINUE; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 500 | } |
| 501 | |
| 502 | DWORD |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 503 | DebuggerThread::HandleODSEvent(const OUTPUT_DEBUG_STRING_INFO &info, |
| 504 | DWORD thread_id) { |
| 505 | return DBG_CONTINUE; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 506 | } |
| 507 | |
| 508 | DWORD |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 509 | DebuggerThread::HandleRipEvent(const RIP_INFO &info, DWORD thread_id) { |
Pavel Labath | a385d2c | 2017-02-22 10:38:02 +0000 | [diff] [blame] | 510 | Log *log = ProcessWindowsLog::GetLogIfAny(WINDOWS_LOG_EVENT); |
| 511 | LLDB_LOG(log, "encountered error {0} (type={1}) in process {2} thread {3}", |
| 512 | info.dwError, info.dwType, m_process.GetProcessId(), thread_id); |
Zachary Turner | 610e529 | 2015-05-07 21:39:33 +0000 | [diff] [blame] | 513 | |
Zachary Turner | 97206d5 | 2017-05-12 04:51:55 +0000 | [diff] [blame] | 514 | Status error(info.dwError, eErrorTypeWin32); |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 515 | m_debug_delegate->OnDebuggerError(error, info.dwType); |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 516 | |
Kate Stone | b9c1b51 | 2016-09-06 20:57:50 +0000 | [diff] [blame] | 517 | return DBG_CONTINUE; |
Zachary Turner | 02862bc | 2014-11-07 23:44:13 +0000 | [diff] [blame] | 518 | } |