LLDB mainline
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
lldb_private::ModuleCache Class Reference

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

using lldb_private::ModuleCache::ModuleDownloader = std::function<Status(const ModuleSpec &, const FileSpec &)>

Definition at line 49 of file ModuleCache.h.

◆ SymfileDownloader

Definition at line 51 of file ModuleCache.h.

Member Function Documentation

◆ Get()

Status ModuleCache::Get ( const FileSpec root_dir_spec,
const char *  hostname,
const ModuleSpec module_spec,
lldb::ModuleSP cached_module_sp,
bool *  did_create_ptr 
)
private

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