[Lldb-commits] [PATCH] D45703: Use a utility function to speed up "process load image" for POSIX Platforms

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 17 07:22:16 PDT 2018


clayborg added inline comments.


================
Comment at: include/lldb/Target/Process.h:811
   //------------------------------------------------------------------
+  /// Get the cached UtilityFunction that assists in loading binary
+  /// images into the process.
----------------
Fix comment to say "Set" instead of "Get"


================
Comment at: include/lldb/Target/Process.h:837
+  //------------------------------------------------------------------
+  UtilityFunction *GetLoadImageUtilityFunction(Platform *platform);
+
----------------
I would think that saving utility functions can be used by other plug-ins. It might be nice to change these two functions to take a name + utility function for the setter. So these functions would look like:

```
  void SetCachedUtilityFunction(ConstString name, UtilityFunction *utility_func);
  UtilityFunction *GetCachedUtilityFunction(ConstString name);
```

Then other plug-ins could cache utility function. I would rather not have each new plug-in that needs this to have to add specific accessor functions.



================
Comment at: include/lldb/Target/Process.h:3165
+  
+  std::unique_ptr<UtilityFunction> m_dlopen_utility_func_up;
 
----------------
Make this a map of ConstString -> std::unique_ptr<UtilityFunction> if we end up using SetCachedUtilityFunction as described above


Repository:
  rL LLVM

https://reviews.llvm.org/D45703





More information about the lldb-commits mailing list