[Lldb-commits] [lldb] [LLDB][NFC] Remove Debugger dependency in SystemLifetimeManager (PR #134383)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Apr 4 09:43:56 PDT 2025


JDevlieghere wrote:

> I don't see much difference between using libraries or a number of object file. 

It's easier to reason about libraries and library dependencies. Not counting the plugins, we have ~10 libraries and ~1000 object files. The difference is knowing what can depend on what. Expecting developers to have a mental model of 10 libraries is reasonable and documentable. Expecting to know that you can't use a very common class within the same library is not. 

> If the code references a function, we need to provide that function anyway, whether it's a library or a separate object file. To break dependency we need to separate the interface and the implementation. The class Debugger is used directly in mane places. We don't need the Debugger plug-in. But we need to define DebuggerInterface and use it instead.

I'm arguing that is solving the wrong problem. I assume that `lldb-server` doesn't need `Debugger`. I understand it's a lot of work to remove all the places we depend on it, but doing anything else is just working around the problem. I don't mind being pragmatic, but without a mechanism to make sure that workaround keeps its value, we're making the code more complex for some temporary reprieve. 

https://github.com/llvm/llvm-project/pull/134383


More information about the lldb-commits mailing list