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

Walter Erquinigo via lldb-commits lldb-commits at lists.llvm.org
Fri Sep 29 15:34:07 PDT 2023


walter-erquinigo wrote:

@clayborg , LLDB has the cmake flag `LLDB_EXPORT_ALL_SYMBOLS` (see https://github.com/llvm/llvm-project/blob/main/lldb/cmake/modules/AddLLDB.cmake#L177) that is used to export `lldb_private` as well as `lldb` symbols. This shows that there's been a precedent for this kind of features and it seems to be well maintained.

Besides that, I do like your idea of exporting specific namespaces for plugins, however for this specific case, I do think that lldb_private is the namespace to use. The main reason is that `lldb_private::TypeSystem` forces to implement `DWARFASTParser`, which is a base class with its implementation in the plugin folder. A cleaner API would have all of the necessary bits to implement the `DWARFASTParser` child in the lldb_private namespace outside of a plugin, because `lldb_private::TypeSystem` is already outside of any plugin folder, just like other DWARF-related classes like `DWARFExpression` are outside of plugin folders. I chatted with @bulbazord about moving some DWARF files from the symbol plugin to be at the same level as the type system, but that's particularly challenging because of heavy coupling between the DWARF parser code and clang/clang typesystem. So this patch at least puts some code in the correct namespace, so to speak.


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


More information about the lldb-commits mailing list