Pin
|
Classes | |
struct | DECSTR |
struct | HEXSTR |
class | MemRange |
struct | OPTIONAL_VALUE< T > |
struct | FLTSTR |
Functions | |
BOOL | CharIsSpace (CHAR c) |
CHAR | CharToUpper (CHAR c) |
std::string | ptrstr (const VOID *val) |
std::string | StringFromAddrint (ADDRINT l) |
std::string | StringFromUint64 (UINT64 l) |
std::string | StringDec (UINT64 l, UINT32 digits, CHAR padding) |
std::string | StringDecSigned (INT64 l, UINT32 digits, CHAR padding) |
std::string | StringBignum (INT64 l, UINT32 digits, CHAR padding) |
std::string | Reformat (const std::string &s, const std::string &prefix, UINT32 min_line, UINT32 max_line) |
std::string | StringHex32 (UINT32 l, UINT32 digits, BOOL prefix_0x) |
std::string | StringBool (BOOL b) |
std::string | StringTri (TRI t) |
INT32 | Int32FromString (const std::string &s) |
UINT32 | Uint32FromString (const std::string &s) |
INT64 | Int64FromString (const std::string &s) |
UINT64 | Uint64FromString (const std::string &s) |
FLT64 | FLT64FromString (const std::string &s) |
INT | CharToHexDigit (CHAR c) |
ADDRINT | AddrintFromString (const std::string &str) |
std::string | ReadLine (std::istream &inputFile, UINT32 *lineNum) |
std::string | StringHex (UINT32 l, UINT32 digits, BOOL prefix_0x=TRUE) |
std::string | decstr (INT64 val, UINT32 width=0) |
std::string | decstr (INT32 val, UINT32 width=0) |
std::string | decstr (INT16 val, UINT32 width=0) |
std::string | decstr (UINT64 val, UINT32 width=0) |
std::string | decstr (UINT32 val, UINT32 width=0) |
std::string | decstr (UINT16 val, UINT32 width=0) |
std::string | hexstr (INT64 val, UINT32 width=0) |
std::string | hexstr (INT32 val, UINT32 width=0) |
std::string | hexstr (INT16 val, UINT32 width=0) |
std::string | hexstr (UINT64 val, UINT32 width=0) |
std::string | hexstr (VOID *p, UINT32 width=0) |
std::string | hexstr (const VOID *p, UINT32 width=0) |
std::string | hexstr (UINT32 val, UINT32 width=0) |
std::string | hexstr (UINT16 val, UINT32 width=0) |
std::string | ljstr (const std::string &s, UINT32 width, CHAR padding=' ') |
UINT32 | BitCount (ADDRINT val) |
VOID * | Addrint2VoidStar (ADDRINT addr) |
ADDRINT | VoidStar2Addrint (const VOID *addr) |
ADDRINT | VoidStar2Addrint (VOID *addr) |
template<typename T > | |
T | RoundUp (T value, size_t alignment) |
template<typename T > | |
T * | RoundUp (T *ptr, size_t alignment) |
template<typename T > | |
T | RoundDown (T value, size_t alignment) |
template<typename T > | |
T * | RoundDown (T *ptr, size_t alignment) |
ADDRINT | GetPageOfAddr (ADDRINT addr) |
std::string | Joinpath (std::string s1, std::string s2) |
CHAR * | CreateTmpFileName (const CHAR *fnameTemplate, const UINT32 fnameTemplateSize) |
const VOID * | GetSp () |
size_t | PtrDiff (const VOID *ptr1, const VOID *ptr2) |
VOID * | PtrAtOffset (VOID *ptr, size_t offset) |
const VOID * | PtrAtOffset (const VOID *ptr, size_t offset) |
MemRange | MemPageRange (ADDRINT addr) |
MemRange | MemPageRange (const VOID *addr) |
std::string | StringFlt (FLT64 val, UINT32 precision, UINT32 width) |
std::string | fltstr (FLT64 val, UINT32 prec=0, UINT32 width=0) |
|
inline |
Convert ADDRINT to "void *"
ADDRINT AddrintFromString | ( | const std::string & | str | ) |
Convert a string to an ADDRINT.
UINT32 BitCount | ( | ADDRINT | val | ) |
popcount/bitcount code using the usual trick
BOOL CharIsSpace | ( | CHAR | c | ) |
This module contains useful utility functions.
ctype::isspace alternative (avoids complications from including ctype.h).
INT CharToHexDigit | ( | CHAR | c | ) |
Convert specified character to the corresponding hexadecimal digit.
CHAR CharToUpper | ( | CHAR | c | ) |
ctype::toupper alternative (avoids complications from including ctype.h).
CHAR* CreateTmpFileName | ( | const CHAR * | fnameTemplate, |
const UINT32 | fnameTemplateSize | ||
) |
Create a temporary file name
|
inline |
Create a string containing the given decimal integer.
|
inline |
Create a string containing the given decimal integer.
|
inline |
Create a string containing the given decimal integer.
|
inline |
Create a string containing the given decimal integer.
|
inline |
Create a string containing the given decimal integer.
|
inline |
Create a string containing the given decimal integer.
FLT64 FLT64FromString | ( | const std::string & | s | ) |
Convert a string to a FLT64.
|
inline |
Create a string containing the given floating point number.
ADDRINT GetPageOfAddr | ( | ADDRINT | addr | ) |
Get the address of the page that addr is in
const VOID* GetSp | ( | ) |
|
inline |
Create a string with a hexadecimal prefix containing the given hexadecimal integer.
|
inline |
Create a string with a hexadecimal prefix containing the given hexadecimal integer.
|
inline |
Create a string with a hexadecimal prefix containing the given hexadecimal integer.
|
inline |
Create a string with a hexadecimal prefix containing the given hexadecimal integer.
|
inline |
Create a string with a hexadecimal prefix containing the given hexadecimal integer.
|
inline |
Create a string with a hexadecimal prefix containing the given hexadecimal integer.
|
inline |
Create a string with a hexadecimal prefix containing the given hexadecimal integer.
|
inline |
Create a string with a hexadecimal prefix containing the given hexadecimal integer.
INT32 Int32FromString | ( | const std::string & | s | ) |
Convert a string to an INT32.
INT64 Int64FromString | ( | const std::string & | s | ) |
Convert a string to an INT64.
std::string Joinpath | ( | std::string | s1, |
std::string | s2 | ||
) |
Concatenate two strings with a path delimiter
|
inline |
Left justify string.
MemRange MemPageRange | ( | ADDRINT | addr | ) |
Get the page that contains the specified address
[in] | addr | address inside the requested page |
MemRange MemPageRange | ( | const VOID * | addr | ) |
Get the page that contains the specified address
[in] | addr | address inside the requested page |
|
inline |
Return const pointer whose offset, in bytes, from <ptr> is <offset>
Return const pointer of type <T> whose offset, in bytes, from <ptr> is <offset>
|
inline |
Return pointer whose offset, in bytes, from <ptr> is <offset>
Return pointer of type <T> whose offset, in bytes, from <ptr> is <offset>
|
inline |
Return offset, in bytes, of <ptr1> from <ptr2>
std::string ptrstr | ( | const VOID * | val | ) |
Print pointer.
std::string ReadLine | ( | std::istream & | inputFile, |
UINT32 * | lineNum | ||
) |
Read a line from file while maintaining a current line count skipping over blank and comment lines.
std::string Reformat | ( | const std::string & | s, |
const std::string & | prefix, | ||
UINT32 | min_line, | ||
UINT32 | max_line | ||
) |
Add new lines to string to make it fit given line width restrictions.
T* RoundDown | ( | T * | ptr, |
size_t | alignment | ||
) |
Specialization of the RoundDown function for pointer type
T RoundDown | ( | T | value, |
size_t | alignment | ||
) |
Round integer of type <T> down to given alignment.
T* RoundUp | ( | T * | ptr, |
size_t | alignment | ||
) |
Specialization of the RoundUp function for pointer type
T RoundUp | ( | T | value, |
size_t | alignment | ||
) |
Round integer of type <T> up to given alignment.
std::string StringBignum | ( | INT64 | l, |
UINT32 | digits, | ||
CHAR | padding | ||
) |
Convert a INT64 into a dec string with 1000 separation . Padding can be specified as well.
std::string StringBool | ( | BOOL | b | ) |
Convert a BOOL into a string.
std::string StringDec | ( | UINT64 | l, |
UINT32 | digits, | ||
CHAR | padding | ||
) |
Convert a UINT64 into a dec string. Padding can be specified as well.
std::string StringDecSigned | ( | INT64 | l, |
UINT32 | digits, | ||
CHAR | padding | ||
) |
Convert a INT64 into a dec string. Padding can be specified as well.
std::string StringFlt | ( | FLT64 | val, |
UINT32 | precision, | ||
UINT32 | width | ||
) |
Convert a FLT64 into a string. Padding can be specified as well.
std::string StringFromAddrint | ( | ADDRINT | l | ) |
Convert a ADDRINT into a string using the hex address format.
std::string StringFromUint64 | ( | UINT64 | l | ) |
Convert a UINT64 into a string using the hex address format.
|
inline |
Create a string with a hexadecimal prefix containing the given hexadecimal integer.
std::string StringHex32 | ( | UINT32 | l, |
UINT32 | digits, | ||
BOOL | prefix_0x | ||
) |
Convert a UINT32 into a hex string. Padding can be specified as well.
std::string StringTri | ( | TRI | t | ) |
Convert a TRI into a string.
UINT32 Uint32FromString | ( | const std::string & | s | ) |
Convert a string to a UINT32.
UINT64 Uint64FromString | ( | const std::string & | s | ) |
Convert a string to a UINT64.
|
inline |
Convert "void *" to ADDRINT.
|
inline |
Convert "void *" to ADDRINT