|
LLDB mainline
|
A set of cache entries, all of which are aligned and have the same size. More...
#include <Memory.h>
Public Types | |
| using | const_iterator = Collection::const_iterator |
| Iteration yields a line index and its bytes, in unspecified order. | |
Public Member Functions | |
| LineCache (uint32_t line_byte_size) | |
| uint32_t | GetLineByteSize () const |
| llvm::ArrayRef< uint8_t > | Lookup (lldb::addr_t addr) const |
| The cached bytes from addr to the end of the line holding it, empty if that line is not resident. | |
| bool | Holds (lldb::addr_t addr) const |
| void | Insert (lldb::addr_t addr, llvm::ArrayRef< uint8_t > src) |
| Add one whole line. | |
| void | EraseRange (lldb::addr_t addr, lldb::addr_t size) |
| Drop every line that intersects [addr, addr+size). | |
| void | Clear (uint32_t new_line_byte_size) |
| size_t | GetSize () const |
| const_iterator | begin () const |
| const_iterator | end () const |
Private Types | |
| using | Collection = llvm::DenseMap<uint64_t, std::unique_ptr<uint8_t[]>> |
| Keyed by line index, so a key names a whole line. | |
Private Member Functions | |
| uint64_t | IndexOf (lldb::addr_t addr) const |
Private Attributes | |
| Collection | m_lines |
| uint32_t | m_line_byte_size |
A set of cache entries, all of which are aligned and have the same size.
Entries cannot be partially filled.
|
private |
| using lldb_private::LineCache::const_iterator = Collection::const_iterator |
|
inlineexplicit |
Definition at line 31 of file Memory.h.
References m_line_byte_size.
|
inline |
|
inline |
Definition at line 51 of file Memory.h.
References m_line_byte_size, and m_lines.
|
inline |
| void LineCache::EraseRange | ( | lldb::addr_t | addr, |
| lldb::addr_t | size ) |
Drop every line that intersects [addr, addr+size).
Definition at line 46 of file Memory.cpp.
|
inline |
Definition at line 34 of file Memory.h.
References m_line_byte_size.
|
inline |
|
inline |
|
inlineprivate |
Definition at line 64 of file Memory.h.
References m_line_byte_size.
Referenced by EraseRange(), Holds(), Insert(), and Lookup().
| void LineCache::Insert | ( | lldb::addr_t | addr, |
| llvm::ArrayRef< uint8_t > | src ) |
Add one whole line.
addr must be line aligned and src must hold a whole line.
Definition at line 36 of file Memory.cpp.
References IndexOf(), m_line_byte_size, and m_lines.
| llvm::ArrayRef< uint8_t > LineCache::Lookup | ( | lldb::addr_t | addr | ) | const |
The cached bytes from addr to the end of the line holding it, empty if that line is not resident.
Definition at line 27 of file Memory.cpp.
References IndexOf(), m_line_byte_size, and m_lines.
|
private |
Definition at line 67 of file Memory.h.
Referenced by Clear(), GetLineByteSize(), IndexOf(), Insert(), LineCache(), and Lookup().
|
private |