LLDB mainline
|
#include <FileCache.h>
Public Member Functions | |
lldb::user_id_t | OpenFile (const FileSpec &file_spec, File::OpenOptions flags, uint32_t mode, Status &error) |
bool | CloseFile (lldb::user_id_t fd, Status &error) |
uint64_t | WriteFile (lldb::user_id_t fd, uint64_t offset, const void *src, uint64_t src_len, Status &error) |
uint64_t | ReadFile (lldb::user_id_t fd, uint64_t offset, void *dst, uint64_t dst_len, Status &error) |
Static Public Member Functions | |
static FileCache & | GetInstance () |
Private Types | |
typedef std::map< lldb::user_id_t, lldb::FileUP > | FDToFileMap |
Private Member Functions | |
FileCache ()=default | |
Private Attributes | |
FDToFileMap | m_cache |
Static Private Attributes | |
static FileCache * | m_instance = nullptr |
Definition at line 22 of file FileCache.h.
|
private |
Definition at line 26 of file FileCache.h.
|
privatedefault |
Referenced by GetInstance().
bool FileCache::CloseFile | ( | lldb::user_id_t | fd, |
Status & | error | ||
) |
Definition at line 43 of file FileCache.cpp.
References error(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), m_cache, and UINT64_MAX.
Referenced by lldb_private::Platform::CloseFile().
|
static |
Definition at line 19 of file FileCache.cpp.
References FileCache(), and m_instance.
Referenced by lldb_private::Platform::CloseFile(), PlatformPOSIX::GetFile(), lldb_private::Platform::OpenFile(), lldb_private::Platform::ReadFile(), and lldb_private::Platform::WriteFile().
lldb::user_id_t FileCache::OpenFile | ( | const FileSpec & | file_spec, |
File::OpenOptions | flags, | ||
uint32_t | mode, | ||
Status & | error | ||
) |
Definition at line 26 of file FileCache.cpp.
References error(), lldb_private::Status::FromError(), lldb_private::Status::FromErrorString(), lldb_private::FileSystem::Instance(), m_cache, lldb_private::FileSystem::Open(), and UINT64_MAX.
Referenced by PlatformPOSIX::GetFile(), and lldb_private::Platform::OpenFile().
uint64_t FileCache::ReadFile | ( | lldb::user_id_t | fd, |
uint64_t | offset, | ||
void * | dst, | ||
uint64_t | dst_len, | ||
Status & | error | ||
) |
Definition at line 92 of file FileCache.cpp.
References error(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), m_cache, and UINT64_MAX.
Referenced by lldb_private::Platform::ReadFile().
uint64_t FileCache::WriteFile | ( | lldb::user_id_t | fd, |
uint64_t | offset, | ||
const void * | src, | ||
uint64_t | src_len, | ||
Status & | error | ||
) |
Definition at line 64 of file FileCache.cpp.
References error(), lldb_private::Status::FromErrorString(), lldb_private::Status::FromErrorStringWithFormat(), m_cache, and UINT64_MAX.
Referenced by lldb_private::Platform::WriteFile().
|
private |
Definition at line 43 of file FileCache.h.
Referenced by CloseFile(), OpenFile(), ReadFile(), and WriteFile().
|
staticprivate |
Definition at line 41 of file FileCache.h.
Referenced by GetInstance().