[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.
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 7c55125..f136271 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -2675,6 +2675,7 @@
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 @@
}
if (state == eStateStopped || state == eStateCrashed) {
- GetTarget().ClearAllLoadedSections();
DidLaunch();
// Now that we know the process type, update its signal responses from the