[Lldb-commits] [PATCH] D63165: Initial support for native debugging of x86/x64 Windows processes

Hui Huang via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jul 18 22:48:36 PDT 2019

Hui added inline comments.

Comment at: lldb/source/Plugins/Process/Windows/Common/NativeRegisterContextWindows_x86_64.cpp:104-109
+  if (::SuspendThread(thread_handle) == -1) {
+    error.SetError(GetLastError(), eErrorTypeWin32);
+    LLDB_LOG(log, "{0} ResumeThread failed with error {1}", __FUNCTION__,
+             error);
+    return error;
+  }
labath wrote:
> Are these suspend/resume calls necessary? You should be able to assume that the process is stopped (due to breakpoint, exception or whatever). Nobody will be calling functions that get/set registers on a running process. (linux does not support that either, but we don't bother explicitly stopping the process before we attempt to do this).
Yes, agreed. But such codes are added to be consistent with what is now in upstream from https://reviews.llvm.org/rL364216. (CacheAllRegisterValues).



More information about the lldb-commits mailing list