Zydis
v2.0.0-beta1
|
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_NO_EXPORT ZYDIS_INLINE ZydisStatus | ZydisStringInit (ZydisString *string, char *value) |
Initializes a ZydisString struct with a C-string. More... | |
ZYDIS_NO_EXPORT ZYDIS_INLINE ZydisStatus | ZydisStringFinalize (ZydisString *string) |
Finalizes a ZydisString struct by adding a terminating zero byte. More... | |
ZYDIS_NO_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_NO_EXPORT ZYDIS_INLINE 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_NO_EXPORT ZYDIS_INLINE 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_NO_EXPORT ZYDIS_INLINE ZydisStatus | ZydisStringAppend (ZydisString *string, const ZydisString *text) |
Appends a ZydisString to another ZydisString . More... | |
ZYDIS_NO_EXPORT ZYDIS_INLINE ZydisStatus | ZydisStringAppendC (ZydisString *string, const char *text) |
Appends the given C-string to a ZydisString . More... | |
ZYDIS_NO_EXPORT ZYDIS_INLINE ZydisStatus | ZydisStringAppendStatic (ZydisString *string, const ZydisStaticString *text, ZydisLetterCase letterCase) |
Appends the given 'ZydisStaticString' to a ZydisString . More... | |
ZYDIS_NO_EXPORT ZydisStatus | ZydisPrintDecU (ZydisString *string, ZydisU64 value, ZydisU8 paddingLength) |
Formats the given unsigned ordinal value to its decimal text-representation and appends it to s . More... | |
ZYDIS_NO_EXPORT ZydisStatus | ZydisPrintDecS (ZydisString *string, ZydisI64 value, ZydisU8 paddingLength) |
Formats the given signed ordinal value to its decimal text-representation and appends it to s . More... | |
ZYDIS_NO_EXPORT ZydisStatus | ZydisPrintHexU (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 buffer . More... | |
ZYDIS_NO_EXPORT ZydisStatus | ZydisPrintHexS (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 buffer . 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_NO_EXPORT ZydisStatus ZydisPrintDecS | ( | ZydisString * | string, |
ZydisI64 | value, | ||
ZydisU8 | paddingLength | ||
) |
Formats the given signed ordinal value
to its decimal text-representation and
appends it to s
.
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_NO_EXPORT ZydisStatus ZydisPrintDecU | ( | ZydisString * | string, |
ZydisU64 | value, | ||
ZydisU8 | paddingLength | ||
) |
Formats the given unsigned ordinal value
to its decimal text-representation and
appends it to s
.
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_NO_EXPORT ZydisStatus ZydisPrintHexS | ( | 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 buffer
.
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_NO_EXPORT ZydisStatus ZydisPrintHexU | ( | 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 buffer
.
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_NO_EXPORT ZYDIS_INLINE 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_NO_EXPORT ZYDIS_INLINE 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_NO_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_NO_EXPORT ZYDIS_INLINE 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_NO_EXPORT ZYDIS_INLINE 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_NO_EXPORT ZYDIS_INLINE 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_NO_EXPORT ZYDIS_INLINE ZydisStatus ZydisStringFinalize | ( | ZydisString * | string | ) |
Finalizes a ZydisString
struct by adding a terminating zero byte.
string | The string to finalize. |
ZYDIS_NO_EXPORT ZYDIS_INLINE ZydisStatus ZydisStringInit | ( | ZydisString * | string, |
char * | value | ||
) |
Initializes a ZydisString
struct with a C-string.
string | The string to initialize. |
value | The C-string constant. |