LLDB mainline
lldb_private::ModuleCache Class Reference

A module cache class. More...

#include "lldb/Target/ModuleCache.h"

Public Types

using ModuleDownloader
using SymfileDownloader

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::ModuleWPm_loaded_modules

Detailed Description

A module cache class.

Caches locally modules that are downloaded from remote targets. Each cached module maintains 2 views:

  • UUID view: /${CACHE_ROOT}/${PLATFORM_NAME}/.cache/${UUID}/${MODULE_FILENAME}
  • Sysroot view: /${CACHE_ROOT}/${PLATFORM_NAME}/${HOSTNAME}/${MODULE_FULL_FILEPATH}

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.

Member Typedef Documentation

◆ ModuleDownloader

Initial value:

Definition at line 49 of file ModuleCache.h.

◆ SymfileDownloader

Initial value:
std::function<Status(const lldb::ModuleSP &, const FileSpec &)>
std::shared_ptr< lldb_private::Module > ModuleSP

Definition at line 51 of file ModuleCache.h.

Member Function Documentation

◆ Get()

◆ 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 )

◆ Put()

Status ModuleCache::Put ( const FileSpec & root_dir_spec,
const char * hostname,
const ModuleSpec & module_spec,
const FileSpec & tmp_file,
const FileSpec & target_file )
private

Member Data Documentation

◆ m_loaded_modules

std::unordered_map<std::string, lldb::ModuleWP> lldb_private::ModuleCache::m_loaded_modules
private

Definition at line 69 of file ModuleCache.h.

Referenced by Get().


The documentation for this class was generated from the following files: