mirror of https://github.com/x64dbg/zydis
Minor bugfixes
This commit is contained in:
parent
217d5cc9af
commit
07c325b367
|
@ -63,6 +63,7 @@ enum ZydisFormatterStyles
|
|||
* @brief Generates intel-style disassembly.
|
||||
*/
|
||||
ZYDIS_FORMATTER_STYLE_INTEL,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
*/
|
||||
|
@ -185,11 +186,18 @@ enum ZydisAddressFormat
|
|||
{
|
||||
/**
|
||||
* @brief Displays absolute addresses instead of relative ones.
|
||||
*
|
||||
* Using this value will cause the formatter to invoke `ZYDIS_FORMATTER_HOOK_PRINT_ADDRESS`
|
||||
* for every address.
|
||||
*/
|
||||
ZYDIS_ADDR_FORMAT_ABSOLUTE,
|
||||
/**
|
||||
* @brief Uses signed hexadecimal values to display relative addresses.
|
||||
*
|
||||
* Using this value will cause the formatter to invoke either
|
||||
* `ZYDIS_FORMATTER_HOOK_PRINT_DISPLACEMENT` or `ZYDIS_FORMATTER_HOOK_PRINT_IMMEDIATE` to
|
||||
* format addresses.
|
||||
*
|
||||
* Examples:
|
||||
* "JMP 0x20"
|
||||
* "JMP -0x20"
|
||||
|
@ -197,12 +205,17 @@ enum ZydisAddressFormat
|
|||
ZYDIS_ADDR_FORMAT_RELATIVE_SIGNED,
|
||||
/**
|
||||
* @brief Uses unsigned hexadecimal values to display relative addresses.
|
||||
*
|
||||
*
|
||||
* Using this value will cause the formatter to invoke either
|
||||
* `ZYDIS_FORMATTER_HOOK_PRINT_DISPLACEMENT` or `ZYDIS_FORMATTER_HOOK_PRINT_IMMEDIATE` to
|
||||
* format addresses.
|
||||
*
|
||||
* Examples:
|
||||
* "JMP 0x20"
|
||||
* "JMP 0xE0"
|
||||
*/
|
||||
ZYDIS_ADDR_FORMAT_RELATIVE_UNSIGNED,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
*/
|
||||
|
@ -234,6 +247,7 @@ enum ZydisDisplacementFormat
|
|||
* "MOV EAX, DWORD PTR SS:[ESP+0xFFFFFC00]"
|
||||
*/
|
||||
ZYDIS_DISP_FORMAT_HEX_UNSIGNED,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
*/
|
||||
|
@ -270,6 +284,7 @@ enum ZydisImmediateFormat
|
|||
* "MOV EAX, 0xFFFFFC00"
|
||||
*/
|
||||
ZYDIS_IMM_FORMAT_HEX_UNSIGNED,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
*/
|
||||
|
@ -364,6 +379,7 @@ enum ZydisFormatterHookTypes
|
|||
* @brief This function is called to print an immediate value.
|
||||
*/
|
||||
ZYDIS_FORMATTER_HOOK_PRINT_IMMEDIATE,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
*/
|
||||
|
@ -390,6 +406,7 @@ enum ZydisDecoratorTypes
|
|||
ZYDIS_DECORATOR_TYPE_SWIZZLE,
|
||||
ZYDIS_DECORATOR_TYPE_CONVERSION,
|
||||
ZYDIS_DECORATOR_TYPE_EVICTION_HINT,
|
||||
|
||||
/**
|
||||
* @brief Maximum value of this enum.
|
||||
*/
|
||||
|
|
|
@ -65,6 +65,8 @@ ZYDIS_EXPORT const char* ZydisMnemonicGetString(ZydisMnemonic mnemonic);
|
|||
* @param mnemonic The mnemonic.
|
||||
*
|
||||
* @return The instruction mnemonic string or @c NULL, if an invalid mnemonic was passed.
|
||||
*
|
||||
* The `buffer` of the returned struct is guaranteed to be zero-terminated in this special case.
|
||||
*/
|
||||
ZYDIS_EXPORT const ZydisString* ZydisMnemonicGetStringEx(ZydisMnemonic mnemonic);
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ enum ZydisLetterCases
|
|||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Creates a `ZydisString` struct from a constant C-string.
|
||||
* @brief Creates a `ZydisString` struct from a static C-string.
|
||||
*
|
||||
* @param string The C-string constant.
|
||||
*/
|
||||
|
@ -211,7 +211,7 @@ ZYDIS_NO_EXPORT ZYDIS_INLINE ZydisStatus ZydisStringAppendC(ZydisString* string,
|
|||
ZydisString other;
|
||||
ZYDIS_CHECK(ZydisStringInit(&other, (char*)text));
|
||||
|
||||
return ZydisStringAppend(string, &other);
|
||||
return ZydisStringAppendEx(string, &other, ZYDIS_LETTER_CASE_DEFAULT);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -61,6 +61,16 @@ typedef struct ZydisGeneratedString_
|
|||
|
||||
#pragma pack(pop)
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Helper macros */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* @brief Creates a `ZydisGeneratedString` from a static C-string.
|
||||
*/
|
||||
#define ZYDIS_MAKE_GENERATED_STRING(string) \
|
||||
{ string, sizeof(string) - 1 }
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
/* Helper functions */
|
||||
/* ---------------------------------------------------------------------------------------------- */
|
||||
|
|
Loading…
Reference in New Issue