[Lldb-commits] [lldb] [LLDB] Export DWARF Parser symbols for external language plugins (PR #67851)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 29 16:52:25 PDT 2023


clayborg wrote:

> I think I am on the same page with Greg for not exposing these symbols for not shoving everything into `lldb_private`. Perhaps instead of `lldb_plugin` we can name it something like `lldb_private::plugin` instead? Not a huge difference, but keeping the top-level private namespace still indicates that it is still a "private" API.

I think of the lldb_private being the internal LLDB specific code, not plugin code. Right now most plugin code isn't in any namespace and I don't think it belongs in lldb_private.

> Even if most folks aren't going to export lldb_private symbols in their distribution of LLDB, perhaps the folks at Modular would like to do that for the lldb they ship. The fact that the only stable interface is the SBAPI will not change as a result of doing that.

This would allow them access to the lldb specific code mostly needed to implement core functionality. But for plug-ins, it would be nice to be able to only export the specific plug-ins needed by folks to keep the number of exported functions down. If the plugin code is in "lldb_private::plugin", then if you export "lldb_private::*" you end up exporting all plug-ins whether you want them or not. Keeping them in a different namespace like "lldb_plugins" would allow you to export all of them "lldb_plugins::*", or just one with "lldb_plugins::dwarf*".

> Changing the architecture or the way we build LLDB (having some lldb_private.so/LLDBPrivate.framework) is a pretty big decision that I think will require more buy-in from the community. Whether or not that's the right direction to go in, I'm not sure. But that discussion is much more suitable for the LLVM Discourse.

Agreed
 

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


More information about the lldb-commits mailing list