LLDB mainline
|
A module cache class. More...
#include "lldb/Target/ModuleCache.h"
Public Types | |
using | ModuleDownloader = std::function< Status(const ModuleSpec &, const FileSpec &)> |
using | SymfileDownloader = std::function< Status(const lldb::ModuleSP &, const FileSpec &)> |
Public Member Functions | |
Status | GetAndPut (const FileSpec &root_dir_spec, const char *hostname, const ModuleSpec &module_spec, const ModuleDownloader &module_downloader, const SymfileDownloader &symfile_downloader, lldb::ModuleSP &cached_module_sp, bool *did_create_ptr) |
Private Member Functions | |
Status | Put (const FileSpec &root_dir_spec, const char *hostname, const ModuleSpec &module_spec, const FileSpec &tmp_file, const FileSpec &target_file) |
Status | Get (const FileSpec &root_dir_spec, const char *hostname, const ModuleSpec &module_spec, lldb::ModuleSP &cached_module_sp, bool *did_create_ptr) |
Private Attributes | |
std::unordered_map< std::string, lldb::ModuleWP > | m_loaded_modules |
A module cache class.
Caches locally modules that are downloaded from remote targets. Each cached module maintains 2 views:
UUID views stores a real module file, whereas Sysroot view holds a symbolic link to UUID-view file.
Example: UUID view : /tmp/lldb/remote- linux/.cache/30C94DC6-6A1F-E951-80C3-D68D2B89E576-D5AE213C/libc.so.6 Sysroot view: /tmp/lldb/remote-linux/ubuntu/lib/x86_64-linux-gnu/libc.so.6
Definition at line 47 of file ModuleCache.h.
using lldb_private::ModuleCache::ModuleDownloader = std::function<Status(const ModuleSpec &, const FileSpec &)> |
Definition at line 49 of file ModuleCache.h.
using lldb_private::ModuleCache::SymfileDownloader = std::function<Status(const lldb::ModuleSP &, const FileSpec &)> |
Definition at line 51 of file ModuleCache.h.
|
private |
Definition at line 215 of file ModuleCache.cpp.
References lldb_private::ConstString::AsCString(), error(), lldb_private::UUID::GetAsString(), lldb_private::FileSpec::GetFilename(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::ModuleSpec::GetObjectSize(), lldb_private::ModuleList::GetSharedModule(), lldb_private::ModuleSpec::GetUUID(), lldb_private::FileSystem::Instance(), and m_loaded_modules.
Referenced by GetAndPut().
Status ModuleCache::GetAndPut | ( | const FileSpec & | root_dir_spec, |
const char * | hostname, | ||
const ModuleSpec & | module_spec, | ||
const ModuleDownloader & | module_downloader, | ||
const SymfileDownloader & | symfile_downloader, | ||
lldb::ModuleSP & | cached_module_sp, | ||
bool * | did_create_ptr | ||
) |
Definition at line 269 of file ModuleCache.cpp.
References error(), Get(), lldb_private::UUID::GetAsString(), lldb_private::ModuleSpec::GetFileSpec(), lldb_private::ModuleSpec::GetUUID(), and Put().
|
private |
Definition at line 191 of file ModuleCache.cpp.
References lldb_private::ConstString::AsCString(), error(), lldb_private::FileSpec::GetFilename(), lldb_private::FileSpec::GetPath(), and lldb_private::ModuleSpec::GetUUID().
Referenced by GetAndPut().
|
private |
Definition at line 69 of file ModuleCache.h.
Referenced by Get().