[Lldb-commits] [PATCH] Add Utility/ModuleCache class and integrate it with PlatformGDBRemoteServer - in order to allow modules caching from remote targets.

Greg Clayton clayborg at gmail.com
Tue Mar 3 13:07:34 PST 2015


Like your plan as detailed in your inlined comments and what you agree with from my initial comments. I look forward to seeing this next patch!


================
Comment at: source/Plugins/Platform/POSIX/PlatformPOSIX.h:35-40
@@ +34,8 @@
+
+    lldb_private::Error
+    GetSharedModule (const lldb_private::ModuleSpec &module_spec,
+                     lldb::ModuleSP &module_sp,
+                     const lldb_private::FileSpecList *module_search_paths_ptr,
+                     lldb::ModuleSP *old_module_sp_ptr,
+                     bool *did_create_ptr) override;
+
----------------
ovyalov wrote:
> clayborg wrote:
> > Move this to Platform.h and rename the function to be GetCachedSharedModule? Then all platforms can take advantage of the local cache. It would be nice if we can create a global platform cache that just works for all platforms. The Platform::GetCachedSharedModule() would check the local cache directory for the module first and use it from there and if it isn't there download it via the Platform::GetFile() and update the cache?
> I like the idea of having Platform::GetCachedSharedModule. But let me ask you next question - how we can get UUID by path, triple (i.e. call qModuleInfo request) from within Platform? Is it okay to lay out it in following way:
>  - Add ModuleSpec Platform::GetModuleSpec(const FileSpec&, const Arch&) method which in default implementation just returns ModuleSpec for local module.
>  - Make PlatformGDBRemoteServer::GetModuleSpec to call qModuleInfo request and return info for remote module.
>  - PlatformPOSIX and other platforms that have m_remote_platform field will override GetModuleSpec and delegate it to m_remote_platform if not a host.
> 
> Does it sound okay to you?
Yes that would be ok.

http://reviews.llvm.org/D8037

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list