Author: Charles Zablit
Date: 2026-07-27T15:34:35+02:00
New Revision: acf113c195682ec3eceafd9a0023f1e8401e71c9

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

LOG: [lldb][Windows] Preserve breakpoint locations across process exit (#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.

Added: 
    

Modified: 
    lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
    
lldb/test/API/functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py

Removed: 
    


################################################################################
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()


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to