[Lldb-commits] [lldb] [lldb][Windows] Preserve breakpoint locations across process exit (PR #212219)

Charles Zablit via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 27 03:09:48 PDT 2026


https://github.com/charles-zablit created https://github.com/llvm/llvm-project/pull/212219

`ProcessWindows::OnExitProcess` unloads the executable module with `delete_locations=true`, which deletes the target's breakpoint locations when the debuggee exits. Other platforms keep them, so inspecting a breakpoint after the process died returns no location on Windows.

Pass `delete_locations=false` to match the other platforms.

>From 28f7162f203c7199b99f2d972407f86510ba39b0 Mon Sep 17 00:00:00 2001
From: Charles Zablit <c_zablit at apple.com>
Date: Mon, 27 Jul 2026 12:07:28 +0200
Subject: [PATCH] [lldb][Windows] Preserve breakpoint locations across process
 exit

---
 lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp   | 2 +-
 .../breakpoint/breakpoint_locations/TestBreakpointLocations.py  | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
index 2aac8dfde2c7b..561710ccec3c8 100644
--- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
@@ -612,7 +612,7 @@ void ProcessWindows::OnExitProcess(uint32_t exit_code) {
     ModuleSP executable_module = target->GetExecutableModule();
     ModuleList unloaded_modules;
     unloaded_modules.Append(executable_module);
-    target->ModulesDidUnload(unloaded_modules, true);
+    target->ModulesDidUnload(unloaded_modules, false);
   }
 
   SetExitStatus(exit_code, /*exit_string=*/"");
diff --git a/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py b/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
index 4c8c90bc81f97..65ca990365654 100644
--- a/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
+++ b/lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py
@@ -10,7 +10,6 @@
 
 
 class BreakpointLocationsTestCase(TestBase):
-    @expectedFailureWindowsAndNoLLDBServer(bugnumber="llvm.org/pr24528")
     def test_enable(self):
         """Test breakpoint enable/disable for a breakpoint ID with multiple locations."""
         self.build()



More information about the lldb-commits mailing list