emrekultursay updated this revision to Diff 372982.
emrekultursay added a comment.
Added m_initial_modules_added=true into LoadAllCurrentModules.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109797/new/
https://reviews.llvm.org/D109797
Files:
lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
Index: lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
===================================================================
--- lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -442,14 +442,18 @@
if (module_sp->GetObjectFile()->GetBaseAddress().GetLoadAddress(
&m_process->GetTarget()) == m_interpreter_base &&
module_sp != m_interpreter_module.lock()) {
- // If this is a duplicate instance of ld.so, unload it. We may end
up
- // with it if we load it via a different path than before (symlink
- // vs real path).
- // TODO: remove this once we either fix library matching or avoid
- // loading the interpreter when setting the rendezvous breakpoint.
- UnloadSections(module_sp);
- loaded_modules.Remove(module_sp);
- continue;
+ if (m_interpreter_module.lock() == nullptr) {
+ m_interpreter_module = module_sp;
+ } else {
+ // If this is a duplicate instance of ld.so, unload it. We may end
+ // up with it if we load it via a different path than before
+ // (symlink vs real path).
+ // TODO: remove this once we either fix library matching or avoid
+ // loading the interpreter when setting the rendezvous breakpoint.
+ UnloadSections(module_sp);
+ loaded_modules.Remove(module_sp);
+ continue;
+ }
}
loaded_modules.AppendIfNeeded(module_sp);
@@ -620,6 +624,7 @@
}
m_process->GetTarget().ModulesDidLoad(module_list);
+ m_initial_modules_added = true;
}
addr_t DynamicLoaderPOSIXDYLD::ComputeLoadOffset() {
Index: lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
===================================================================
--- lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
+++ lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
@@ -442,14 +442,18 @@
if (module_sp->GetObjectFile()->GetBaseAddress().GetLoadAddress(
&m_process->GetTarget()) == m_interpreter_base &&
module_sp != m_interpreter_module.lock()) {
- // If this is a duplicate instance of ld.so, unload it. We may end up
- // with it if we load it via a different path than before (symlink
- // vs real path).
- // TODO: remove this once we either fix library matching or avoid
- // loading the interpreter when setting the rendezvous breakpoint.
- UnloadSections(module_sp);
- loaded_modules.Remove(module_sp);
- continue;
+ if (m_interpreter_module.lock() == nullptr) {
+ m_interpreter_module = module_sp;
+ } else {
+ // If this is a duplicate instance of ld.so, unload it. We may end
+ // up with it if we load it via a different path than before
+ // (symlink vs real path).
+ // TODO: remove this once we either fix library matching or avoid
+ // loading the interpreter when setting the rendezvous breakpoint.
+ UnloadSections(module_sp);
+ loaded_modules.Remove(module_sp);
+ continue;
+ }
}
loaded_modules.AppendIfNeeded(module_sp);
@@ -620,6 +624,7 @@
}
m_process->GetTarget().ModulesDidLoad(module_list);
+ m_initial_modules_added = true;
}
addr_t DynamicLoaderPOSIXDYLD::ComputeLoadOffset() {
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits