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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to