Zydis
v2.0.0
|
Go to the source code of this file.
Data Structures | |
struct | ZydisString_ |
Defines the ZydisString struct. More... | |
struct | ZydisStaticString_ |
Defines the ZydisStaticString struct. More... | |
Macros | |
#define | ZYDIS_MAKE_STRING(string) { (char*)string, sizeof(string) - 1, sizeof(string) - 1 } |
Creates a ZydisString struct from a static C-string. More... | |
#define | ZYDIS_MAKE_STATIC_STRING(string) { string, sizeof(string) - 1 } |
Creates a ZydisStaticString from a static C-string. More... | |
Typedefs | |
typedef struct ZydisString_ | ZydisString |
Defines the ZydisString struct. More... | |
typedef struct ZydisStaticString_ | ZydisStaticString |
Defines the ZydisStaticString struct. More... | |
typedef ZydisU8 | ZydisLetterCase |
Defines the ZydisLetterCase datatype. More... | |
Enumerations | |
enum | ZydisLetterCases { ZYDIS_LETTER_CASE_DEFAULT , ZYDIS_LETTER_CASE_LOWER , ZYDIS_LETTER_CASE_UPPER , ZYDIS_LETTER_CASE_MAX_VALUE = ZYDIS_LETTER_CASE_UPPER } |
Values that represent letter cases. More... | |
Functions | |
ZYDIS_EXPORT ZydisStatus | ZydisStringInit (ZydisString *string, char *text) |
Initializes a ZydisString struct with a C-string. More... | |
ZYDIS_EXPORT ZydisStatus | ZydisStringFinalize (ZydisString *string) |
Finalizes a ZydisString struct by adding a terminating zero byte. More... | |
ZYDIS_EXPORT ZydisStatus | ZydisStringAppend (ZydisString *string, const ZydisString *text) |
Appends a ZydisString to another ZydisString . More... | |
ZYDIS_EXPORT ZydisStatus | ZydisStringAppendEx (ZydisString *string, const ZydisString *text, ZydisLetterCase letterCase) |
Appends a ZydisString to another ZydisString , converting it to the specified letter-case. More... | |
ZYDIS_EXPORT ZydisStatus | ZydisStringAppendC (ZydisString *string, const char *text) |
Appends the given C-string to a ZydisString . More... | |
ZYDIS_EXPORT ZydisStatus | ZydisStringAppendExC (ZydisString *string, const char *text, ZydisLetterCase letterCase) |
Appends the given C-string to a ZydisString , converting it to the specified letter-case. More... | |
ZYDIS_EXPORT ZydisStatus | ZydisStringAppendStatic (ZydisString *string, const ZydisStaticString *text, ZydisLetterCase letterCase) |
Appends the given 'ZydisStaticString' to a ZydisString . More... | |
ZYDIS_EXPORT ZydisStatus | ZydisStringAppendExStatic (ZydisString *string, const ZydisStaticString *text, ZydisLetterCase letterCase) |
Appends the given 'ZydisStaticString' to a ZydisString , converting it to the specified letter-case. More... | |
ZYDIS_EXPORT ZydisStatus | ZydisStringAppendDecU (ZydisString *string, ZydisU64 value, ZydisU8 paddingLength) |
Formats the given unsigned ordinal value to its decimal text-representation and appends it to the string . More... | |
ZYDIS_EXPORT ZydisStatus | ZydisStringAppendDecS (ZydisString *string, ZydisI64 value, ZydisU8 paddingLength) |
Formats the given signed ordinal value to its decimal text-representation and appends it to the string . More... | |
ZYDIS_EXPORT ZydisStatus | ZydisStringAppendHexU (ZydisString *string, ZydisU64 value, ZydisU8 paddingLength, ZydisBool uppercase, const ZydisString *prefix, const ZydisString *suffix) |
Formats the given unsigned ordinal value to its hexadecimal text-representation and appends it to the string . More... | |
ZYDIS_EXPORT ZydisStatus | ZydisStringAppendHexS (ZydisString *string, ZydisI64 value, ZydisU8 paddingLength, ZydisBool uppercase, const ZydisString *prefix, const ZydisString *suffix) |
Formats the given signed ordinal value to its hexadecimal text-representation and appends it to the string . More... | |
#define ZYDIS_MAKE_STATIC_STRING | ( | string | ) | { string, sizeof(string) - 1 } |
Creates a ZydisStaticString
from a static C-string.
string | The C-string constant. |
#define ZYDIS_MAKE_STRING | ( | string | ) | { (char*)string, sizeof(string) - 1, sizeof(string) - 1 } |
Creates a ZydisString
struct from a static C-string.
string | The C-string constant. |
typedef ZydisU8 ZydisLetterCase |
Defines the ZydisLetterCase
datatype.
typedef struct ZydisStaticString_ ZydisStaticString |
Defines the ZydisStaticString
struct.
This more compact struct is mainly used for internal string-tables to save up some bytes.
typedef struct ZydisString_ ZydisString |
Defines the ZydisString
struct.
enum ZydisLetterCases |
ZYDIS_EXPORT ZydisStatus ZydisStringAppend | ( | ZydisString * | string, |
const ZydisString * | text | ||
) |
Appends a ZydisString
to another ZydisString
.
string | The string to append to. |
text | The string to append. |
ZYDIS_STATUS_SUCCESS
, if the function succeeded, or ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE
, if the size of the buffer was not sufficient to append the given text
. ZYDIS_EXPORT ZydisStatus ZydisStringAppendC | ( | ZydisString * | string, |
const char * | text | ||
) |
Appends the given C-string to a ZydisString
.
string | The string to append to. |
text | The C-string to append. |
ZYDIS_STATUS_SUCCESS
, if the function succeeded, or ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE
, if the size of the buffer was not sufficient to append the given text
. ZYDIS_EXPORT ZydisStatus ZydisStringAppendDecS | ( | ZydisString * | string, |
ZydisI64 | value, | ||
ZydisU8 | paddingLength | ||
) |
Formats the given signed ordinal value
to its decimal text-representation and appends it to the string
.
string | A pointer to the string. |
value | The value. |
paddingLength | Padds the converted value with leading zeros, if the number of chars is less than the paddingLength (the sign char is ignored). |
ZYDIS_STATUS_SUCCESS
, if the function succeeded, or ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE
, if the size of the buffer was not sufficient to append the given value
.The string-buffer pointer is increased by the number of chars written, if the call was successfull.
ZYDIS_EXPORT ZydisStatus ZydisStringAppendDecU | ( | ZydisString * | string, |
ZydisU64 | value, | ||
ZydisU8 | paddingLength | ||
) |
Formats the given unsigned ordinal value
to its decimal text-representation and appends it to the string
.
string | A pointer to the string. |
value | The value. |
paddingLength | Padds the converted value with leading zeros, if the number of chars is less than the paddingLength . |
ZYDIS_STATUS_SUCCESS
, if the function succeeded, or ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE
, if the size of the buffer was not sufficient to append the given value
.The string-buffer pointer is increased by the number of chars written, if the call was successfull.
ZYDIS_EXPORT ZydisStatus ZydisStringAppendEx | ( | ZydisString * | string, |
const ZydisString * | text, | ||
ZydisLetterCase | letterCase | ||
) |
Appends a ZydisString
to another ZydisString
, converting it to the specified letter-case.
string | The string to append to. |
text | The string to append. |
letterCase | The letter case to use. |
ZYDIS_STATUS_SUCCESS
, if the function succeeded, or ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE
, if the size of the buffer was not sufficient to append the given text
. ZYDIS_EXPORT ZydisStatus ZydisStringAppendExC | ( | ZydisString * | string, |
const char * | text, | ||
ZydisLetterCase | letterCase | ||
) |
Appends the given C-string to a ZydisString
, converting it to the specified letter-case.
string | The string to append to. |
text | The C-string to append. |
letterCase | The letter case to use. |
ZYDIS_STATUS_SUCCESS
, if the function succeeded, or ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE
, if the size of the buffer was not sufficient to append the given text
. ZYDIS_EXPORT ZydisStatus ZydisStringAppendExStatic | ( | ZydisString * | string, |
const ZydisStaticString * | text, | ||
ZydisLetterCase | letterCase | ||
) |
Appends the given 'ZydisStaticString' to a ZydisString
, converting it to the specified letter-case.
string | The string to append to. |
text | The static-string to append. |
letterCase | The letter case to use. |
ZYDIS_STATUS_SUCCESS
, if the function succeeded, or ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE
, if the size of the buffer was not sufficient to append the given text
. ZYDIS_EXPORT ZydisStatus ZydisStringAppendHexS | ( | ZydisString * | string, |
ZydisI64 | value, | ||
ZydisU8 | paddingLength, | ||
ZydisBool | uppercase, | ||
const ZydisString * | prefix, | ||
const ZydisString * | suffix | ||
) |
Formats the given signed ordinal value
to its hexadecimal text-representation and appends it to the string
.
string | A pointer to the string. |
value | The value. |
paddingLength | Padds the converted value with leading zeros, if the number of chars is less than the paddingLength (the sign char is ignored). |
uppercase | Set TRUE to print the hexadecimal value in uppercase letters instead of lowercase ones. |
prefix | The string to use as prefix or NULL , if not needed. |
suffix | The string to use as suffix or NULL , if not needed. |
ZYDIS_STATUS_SUCCESS
, if the function succeeded, or ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE
, if the size of the buffer was not sufficient to append the given value
.The string-buffer pointer is increased by the number of chars written, if the call was successfull.
ZYDIS_EXPORT ZydisStatus ZydisStringAppendHexU | ( | ZydisString * | string, |
ZydisU64 | value, | ||
ZydisU8 | paddingLength, | ||
ZydisBool | uppercase, | ||
const ZydisString * | prefix, | ||
const ZydisString * | suffix | ||
) |
Formats the given unsigned ordinal value
to its hexadecimal text-representation and appends it to the string
.
string | A pointer to the string. |
value | The value. |
paddingLength | Padds the converted value with leading zeros, if the number of chars is less than the paddingLength . |
uppercase | Set TRUE to print the hexadecimal value in uppercase letters instead of lowercase ones. |
prefix | The string to use as prefix or NULL , if not needed. |
suffix | The string to use as suffix or NULL , if not needed. |
ZYDIS_STATUS_SUCCESS
, if the function succeeded, or ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE
, if the size of the buffer was not sufficient to append the given value
.The string-buffer pointer is increased by the number of chars written, if the call was successfull.
ZYDIS_EXPORT ZydisStatus ZydisStringAppendStatic | ( | ZydisString * | string, |
const ZydisStaticString * | text, | ||
ZydisLetterCase | letterCase | ||
) |
Appends the given 'ZydisStaticString' to a ZydisString
.
string | The string to append to. |
text | The static-string to append. |
ZYDIS_STATUS_SUCCESS
, if the function succeeded, or ZYDIS_STATUS_INSUFFICIENT_BUFFER_SIZE
, if the size of the buffer was not sufficient to append the given text
. ZYDIS_EXPORT ZydisStatus ZydisStringFinalize | ( | ZydisString * | string | ) |
Finalizes a ZydisString
struct by adding a terminating zero byte.
string | The string to finalize. |
ZYDIS_EXPORT ZydisStatus ZydisStringInit | ( | ZydisString * | string, |
char * | text | ||
) |
Initializes a ZydisString
struct with a C-string.
string | The string to initialize. |
text | The C-string constant. |