[Lldb-commits] [lldb] [lldb/Target] Add GetStartSymbol method to DynamicLoader plugins (PR #99673)

Jason Molenda via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 19 10:46:47 PDT 2024


================
@@ -329,6 +330,11 @@ class DynamicLoader : public PluginInterface {
   /// safe to call certain APIs or SPIs.
   virtual bool IsFullyInitialized() { return true; }
 
+  /// Return the `start` function \b symbol in the dynamic loader module.
+  virtual llvm::Expected<lldb_private::Symbol> GetStartSymbol() {
----------------
jasonmolenda wrote:

Should this be an llvm::Expected?  It's only going to be defined for DynamicLoaderDarwin today.  If some generic code wanted to use this, where it may not be applicable or defined for another DynamicLoader plugin, it'll need to consume the UnimplementedError.  Given the optionality of it, a std::optional seems more natural to me maybe?

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


More information about the lldb-commits mailing list