Author: Pavel Labath
Date: 2025-05-14T15:38:10+02:00
New Revision: 7e7871d3f58b9da72ca180fcd7f0d2da3f92ec4a

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

LOG: [lldb] Clear loaded sections even earlier

Follow-up to #138892 fixing breakage on windows. Calling
ClearAllLoadedSections earlier is necessary to avoid throwing out the
work done by the windows process plugin.

Added: 
    

Modified: 
    lldb/source/Target/Process.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 7c5512598bbb6..f136271a3b8a8 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -2675,6 +2675,7 @@ Status Process::LaunchPrivate(ProcessLaunchInfo 
&launch_info, StateType &state,
   m_jit_loaders_up.reset();
   m_system_runtime_up.reset();
   m_os_up.reset();
+  GetTarget().ClearAllLoadedSections();
 
   {
     std::lock_guard<std::mutex> guard(m_process_input_reader_mutex);
@@ -2763,7 +2764,6 @@ Status Process::LaunchPrivate(ProcessLaunchInfo 
&launch_info, StateType &state,
   }
 
   if (state == eStateStopped || state == eStateCrashed) {
-    GetTarget().ClearAllLoadedSections();
     DidLaunch();
 
     // Now that we know the process type, update its signal responses from the


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to