[Lldb-commits] [PATCH] D134581: [lldb] Prevent re-adding a module that is already loaded

Jason Molenda via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Sep 24 17:00:54 PDT 2022


jasonmolenda added a comment.

I probably misunderstand the situation DynamicLoaderWindows finds itself in, but in DynamicLoaderDarwin we have similar behavior - you run 'lldb binary' and lldb loads all the directly linked dynamic libraries into the target it creates, pre-execution.  When execution starts, the dynamic linker tells us where the binary is loaded in memory and we call Target::SetExecutableModule with it.  Target::SetExecutableModule has a side effect of clearing the Target's module list - you now have only one binary in the Target, your executable module.  (this is done so the 0th image in the image list is your executable module)

Why aren't your pre-loaded DLLs unloaded when you call Target::SetExecutableModule?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134581/new/

https://reviews.llvm.org/D134581



More information about the lldb-commits mailing list