[Lldb-commits] [lldb] [lldb][windows] Null-check m_session_data in ProcessDebugger::OnDebuggerError (PR #199028)
Charles Zablit via lldb-commits
lldb-commits at lists.llvm.org
Thu May 21 06:48:16 PDT 2026
https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/199028
Add a null check that logs and returns, matching the pattern in OnExitProcess.
>From 2672301bea4816aff578622be3f4d75ed1d40bc1 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Thu, 21 May 2026 11:20:59 +0100
Subject: [PATCH] [lldb][windows] Null-check m_session_data in
ProcessDebugger::OnDebuggerError
Add a null check that logs and returns, matching the
pattern in OnExitProcess.
---
.../Plugins/Process/Windows/Common/ProcessDebugger.cpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
index 51b2dfcb74d86..dfc4db6665852 100644
--- a/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/ProcessDebugger.cpp
@@ -549,6 +549,13 @@ void ProcessDebugger::OnDebuggerError(const Status &error, uint32_t type) {
llvm::sys::ScopedLock lock(m_mutex);
Log *log = GetLog(WindowsLog::Process);
+ if (!m_session_data) {
+ LLDB_LOG(log,
+ "OnDebuggerError called with no active session: error {0}: {1}",
+ error.GetError(), error);
+ return;
+ }
+
if (m_session_data->m_initial_stop_received) {
// This happened while debugging. Do we shutdown the debugging session,
// try to continue, or do something else?
More information about the lldb-commits
mailing list