[Lldb-commits] [lldb] [LLDB][NFC] Move CPlusPlusLanguage methods used in Core/Module.cpp to a separated module to break lldb-server dependencies (PR #132274)
Dmitry Vasilyev via lldb-commits
lldb-commits at lists.llvm.org
Fri Apr 4 03:50:37 PDT 2025
slydiman 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
> 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.
https://github.com/llvm/llvm-project/pull/132274
More information about the lldb-commits
mailing list