[Lldb-commits] [lldb] [LLDB][NFC] Create a namespace for the DWARF plugin (PR #68150)

via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 13 09:36:22 PDT 2023


jimingham wrote:

I think I'm missing something.  The API's you are calling the lldb_plugin API's aren't really stand-alone, are they?  The lldb_plugin::dwarf API's seem to have a bunch of methods that take lldb_private types.  So you already have to have some kind of closure of the exported API's that includes whatever lldb_private types these API's depend on.  You're going to be doing picking and choosing of exports, so I don't see why putting it in another top-level namespace makes this easier?

I also agree with Jonas, we should reserve lldb_plugin for when we make a viable API for the more usefully externalized plugins in lldb.  So even if we need another top-level namespace, we should use still use an accurate name like lldb_plugin_private.

Jim


> On Oct 13, 2023, at 8:29 AM, Walter Erquinigo ***@***.***> wrote:
> 
> 
> That expectations, combined with the fact that LLDB has plugins, makes it really sound like lldb_plugin is the interface we expose for writing (dynamically loadable) plugins.
> 
> I don't think people would have the expectation that you need to use lldb_plugin for a namespace of a dynamically loaded plugin. In fact, an external shared library is free to use any namespace because you only need to provide the symbol PluginInitialize to make LLDB happy. An in any case, if you used lldb_plugin for your plugin, there would be nothing wrong, tbh.
> 
> If we go the lldb_plugin route, we could try to standardize:
> lldb_private -> core lldb symbols that don't belong to a plugin
> lldb_plugin -> symbols from any plugins
> lldb -> public ABI-stable symbols
> 
>> Reply to this email directly, view it on GitHub <https://github.com/llvm/llvm-project/pull/68150#issuecomment-1761707642>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADUPVW4L6GUHI23RWZXFTA3X7FM63ANCNFSM6AAAAAA5RQL3PU>.
> You are receiving this because you are subscribed to this thread.
> 



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


More information about the lldb-commits mailing list