[Lldb-commits] [lldb] [LLDB][NFC] Move CPlusPlusLanguage methods used in Core/Module.cpp to a separated module to break lldb-server dependencies (PR #132274)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 4 04:07:23 PDT 2025
labath wrote:
> > The question here is who is using those files and why. These are all plugins, so they shouldn't be pulled in unless they are `Initialized`.
>
> RichManglingContext.cpp is not a plugin and it uses `m_cxx_method_parser = new CPlusPlusLanguage::MethodName(demangled);`, including casting `get<CPlusPlusLanguage::MethodName>(m_cxx_method_parser)`. We can move `CPlusPlusLanguage::MethodName` from CPlusPlusLanguage plugin to core, but it still depends on CPlusPlusNameParser.cpp
I was referring more to the other items on the list. I assumed, it seems incorrectly, that Alex's patch would fix the dependency in the mangler. It seems like that part still needs to be pluginized, somehow.
>
> > Another way to attack this would be to remove the SystemLifetimeManager->Debugger dependency.
>
> I tried it. `SystemLifetimeManager` calls `Debugger::Initialize(nullptr);` and `Debugger::Terminate();`. `Debugger::Initialize()` creates a mutex and an empty list of debuggers. But it seems the Debugger instance is created while a remote process is running. I'm not sure lldb-server can work w/o Debugger. It also contains a lot of I/O handling code and thread pools. Anyway the class Debugger is used directly in many places. We can start making the class Debugger an interface and move the implementation to the new class DebuggerImpl or such.
I'm actually very much opposed to that. lldb-server not need/use a Debugger, nor a thread pool nor any IO handling present in that file. I wouldn't want to create a Debugger "plugin" for the sake of lldb-server. It should be cut off above that.
https://github.com/llvm/llvm-project/pull/132274
More information about the lldb-commits
mailing list