[Lldb-commits] [lldb] 5d9c2ed - [lldb][windows] Null-check m_session_data in ProcessDebugger::HaltProcess (#199016)

via lldb-commits lldb-commits at lists.llvm.org
Thu May 21 06:33:15 PDT 2026


Author: Charles Zablit
Date: 2026-05-21T14:33:09+01:00
New Revision: 5d9c2ed61ec2bce204c22e1b45bc7c2a7be01b0a

URL: https://github.com/llvm/llvm-project/commit/5d9c2ed61ec2bce204c22e1b45bc7c2a7be01b0a
DIFF: https://github.com/llvm/llvm-project/commit/5d9c2ed61ec2bce204c22e1b45bc7c2a7be01b0a.diff

LOG: [lldb][windows] Null-check m_session_data in ProcessDebugger::HaltProcess (#199016)

Added: 
    

Modified: 
    lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
index 51b2dfcb74d86..f40fda7e72156 100644
--- a/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
@@ -248,6 +248,12 @@ Status ProcessDebugger::HaltProcess(bool &caused_stop) {
   Log *log = GetLog(WindowsLog::Process);
   Status error;
   llvm::sys::ScopedLock lock(m_mutex);
+  if (!m_session_data) {
+    caused_stop = false;
+    LLDB_LOG(log, "HaltProcess called with no active session.");
+    return Status::FromErrorString(
+        "HaltProcess called with no active debugger session.");
+  }
   caused_stop = ::DebugBreakProcess(m_session_data->m_debugger->GetProcess()
                                         .GetNativeProcess()
                                         .GetSystemHandle());


        


More information about the lldb-commits mailing list