ROSE 0.11.145.147
|
An encoder plus interval.
Represents a string by specifying the encoding and an interval of virtual addresses where the encoded octets are stored.
#include <Rose/BinaryAnalysis/String.h>
Public Member Functions | |
EncodedString (const StringEncodingScheme::Ptr &encoder, const AddressInterval &where) | |
StringEncodingScheme::Ptr | encoder () const |
Information about the string encoding. | |
const AddressInterval & | where () const |
Where the string is located in memory. | |
rose_addr_t | address () const |
Starting address of string in memory. | |
size_t | size () const |
Size of encoded string in bytes. | |
size_t | length () const |
Length of encoded string in code points. | |
const CodePoints & | codePoints () const |
Code points associated with the string. | |
std::string | narrow () const |
Return code points as a C++ std::string. | |
std::wstring | wide () const |
Return code points as a C++ std::wstring. | |
void | decode (const MemoryMap &) |
Decodes the string from memory. | |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Starting address of string in memory.
Definition at line 772 of file String.h.
References Sawyer::Container::Interval< T >::least().
|
inline |
Size of encoded string in bytes.
Definition at line 775 of file String.h.
References Sawyer::Container::Interval< T >::size().
|
inline |
|
inline |
std::string Rose::BinaryAnalysis::Strings::EncodedString::narrow | ( | ) | const |
Return code points as a C++ std::string.
This truncates each code point to eight bits.
void Rose::BinaryAnalysis::Strings::EncodedString::decode | ( | const MemoryMap & | ) |
Decodes the string from memory.
A string need not store its code points, in which case this method can decode them from memory. The memory should be the same as when the string was originally found, otherwise an std::runtime_error might be thrown.