Zydis  v4.0.0
Formatter.h
Go to the documentation of this file.
1 /***************************************************************************************************
2 
3  Zyan Disassembler Library (Zydis)
4 
5  Original Author : Florian Bernd
6 
7  * Permission is hereby granted, free of charge, to any person obtaining a copy
8  * of this software and associated documentation files (the "Software"), to deal
9  * in the Software without restriction, including without limitation the rights
10  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11  * copies of the Software, and to permit persons to whom the Software is
12  * furnished to do so, subject to the following conditions:
13  *
14  * The above copyright notice and this permission notice shall be included in all
15  * copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23  * SOFTWARE.
24 
25 ***************************************************************************************************/
26 
32 #ifndef ZYDIS_FORMATTER_H
33 #define ZYDIS_FORMATTER_H
34 
35 #include <Zycore/Defines.h>
36 #include <Zycore/String.h>
37 #include <Zycore/Types.h>
38 #include <Zydis/DecoderTypes.h>
39 #include <Zydis/FormatterBuffer.h>
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /* ============================================================================================== */
46 /* Constants */
47 /* ============================================================================================== */
48 
53 #define ZYDIS_RUNTIME_ADDRESS_NONE (ZyanU64)(-1)
54 
55 /* ============================================================================================== */
56 /* Enums and types */
57 /* ============================================================================================== */
58 
59 /* ---------------------------------------------------------------------------------------------- */
60 /* Formatter style */
61 /* ---------------------------------------------------------------------------------------------- */
62 
67 {
83 
93 
94 /* ---------------------------------------------------------------------------------------------- */
95 /* Properties */
96 /* ---------------------------------------------------------------------------------------------- */
97 
102 {
103  /* ---------------------------------------------------------------------------------------- */
104  /* General */
105  /* ---------------------------------------------------------------------------------------- */
106 
154 
162 
163  /* ---------------------------------------------------------------------------------------- */
164  /* Numeric values */
165  /* ---------------------------------------------------------------------------------------- */
166 
192 
193  /* ---------------------------------------------------------------------------------------- */
194 
210 
211  /* ---------------------------------------------------------------------------------------- */
212 
232 
233  /* ---------------------------------------------------------------------------------------- */
234  /* Text formatting */
235  /* ---------------------------------------------------------------------------------------- */
236 
267 
268  /* ---------------------------------------------------------------------------------------- */
269  /* Number formatting */
270  /* ---------------------------------------------------------------------------------------- */
271 
290 
291  /* ---------------------------------------------------------------------------------------- */
292 
329 
330  /* ---------------------------------------------------------------------------------------- */
331 
341 
342 /* ---------------------------------------------------------------------------------------------- */
343 
347 typedef enum ZydisNumericBase_
348 {
357 
367 
368 /* ---------------------------------------------------------------------------------------------- */
369 
373 typedef enum ZydisSignedness_
374 {
388 
398 
399 /* ---------------------------------------------------------------------------------------------- */
400 
405 typedef enum ZydisPadding_
406 {
416 
425 } ZydisPadding;
426 
427 /* ---------------------------------------------------------------------------------------------- */
428 /* Function types */
429 /* ---------------------------------------------------------------------------------------------- */
430 
438 {
439  /* ---------------------------------------------------------------------------------------- */
440  /* Instruction */
441  /* ---------------------------------------------------------------------------------------- */
442 
451 
452  /* ---------------------------------------------------------------------------------------- */
453 
462 
463  /* ---------------------------------------------------------------------------------------- */
464  /* Operands */
465  /* ---------------------------------------------------------------------------------------- */
466 
475 
476  /* ---------------------------------------------------------------------------------------- */
477 
502 
503  /* ---------------------------------------------------------------------------------------- */
504  /* Elemental tokens */
505  /* ---------------------------------------------------------------------------------------- */
506 
511 
512  /* ---------------------------------------------------------------------------------------- */
513 
556 
557  /* ---------------------------------------------------------------------------------------- */
558  /* Optional tokens */
559  /* ---------------------------------------------------------------------------------------- */
560 
578 
579  /* ---------------------------------------------------------------------------------------- */
580 
590 
591 /* ---------------------------------------------------------------------------------------------- */
592 /* Decorator types */
593 /* ---------------------------------------------------------------------------------------------- */
594 
598 typedef enum ZydisDecorator_
599 {
600  ZYDIS_DECORATOR_INVALID,
629 
639 
640 /* ---------------------------------------------------------------------------------------------- */
641 /* Formatter context */
642 /* ---------------------------------------------------------------------------------------------- */
643 
644 typedef struct ZydisFormatter_ ZydisFormatter;
645 
650 {
673  void* user_data;
675 
676 /* ---------------------------------------------------------------------------------------------- */
677 /* Function prototypes */
678 /* ---------------------------------------------------------------------------------------------- */
679 
720 typedef ZyanStatus (*ZydisFormatterFunc)(const ZydisFormatter* formatter,
721  ZydisFormatterBuffer* buffer, ZydisFormatterContext* context);
722 
737 typedef ZyanStatus (*ZydisFormatterRegisterFunc)(const ZydisFormatter* formatter,
738  ZydisFormatterBuffer* buffer, ZydisFormatterContext* context, ZydisRegister reg);
739 
754 typedef ZyanStatus (*ZydisFormatterDecoratorFunc)(const ZydisFormatter* formatter,
755  ZydisFormatterBuffer* buffer, ZydisFormatterContext* context, ZydisDecorator decorator);
756 
757 /* ---------------------------------------------------------------------------------------------- */
758 /* Formatter struct */
759 /* ---------------------------------------------------------------------------------------------- */
760 
771 {
847  ZyanI32 case_prefixes;
851  ZyanI32 case_mnemonic;
855  ZyanI32 case_registers;
859  ZyanI32 case_typecasts;
867  ZyanBool hex_uppercase;
878  struct
879  {
883  const ZyanStringView* string;
887  ZyanStringView string_data;
891  char buffer[11];
969 };
970 
971 /* ---------------------------------------------------------------------------------------------- */
972 
973 /* ============================================================================================== */
974 /* Exported functions */
975 /* ============================================================================================== */
976 
983 /* ---------------------------------------------------------------------------------------------- */
984 /* Initialization */
985 /* ---------------------------------------------------------------------------------------------- */
986 
996 
997 /* ---------------------------------------------------------------------------------------------- */
998 /* Setter */
999 /* ---------------------------------------------------------------------------------------------- */
1000 
1014  ZydisFormatterProperty property, ZyanUPointer value);
1015 
1033 ZYDIS_EXPORT ZyanStatus ZydisFormatterSetHook(ZydisFormatter* formatter,
1034  ZydisFormatterFunction type, const void** callback);
1035 
1036 /* ---------------------------------------------------------------------------------------------- */
1037 /* Formatting */
1038 /* ---------------------------------------------------------------------------------------------- */
1039 
1057 ZYDIS_EXPORT ZyanStatus ZydisFormatterFormatInstruction(const ZydisFormatter* formatter,
1058  const ZydisDecodedInstruction* instruction, const ZydisDecodedOperand* operands,
1059  ZyanU8 operand_count, char* buffer, ZyanUSize length, ZyanU64 runtime_address,
1060  void* user_data);
1061 
1080 ZYDIS_EXPORT ZyanStatus ZydisFormatterFormatOperand(const ZydisFormatter* formatter,
1081  const ZydisDecodedInstruction* instruction, const ZydisDecodedOperand* operand,
1082  char* buffer, ZyanUSize length, ZyanU64 runtime_address, void* user_data);
1083 
1084 /* ---------------------------------------------------------------------------------------------- */
1085 /* Tokenizing */
1086 /* ---------------------------------------------------------------------------------------------- */
1087 
1107  const ZydisDecodedInstruction* instruction, const ZydisDecodedOperand* operands,
1108  ZyanU8 operand_count, void* buffer, ZyanUSize length, ZyanU64 runtime_address,
1109  ZydisFormatterTokenConst** token, void* user_data);
1110 
1129 ZYDIS_EXPORT ZyanStatus ZydisFormatterTokenizeOperand(const ZydisFormatter* formatter,
1130  const ZydisDecodedInstruction* instruction, const ZydisDecodedOperand* operand,
1131  void* buffer, ZyanUSize length, ZyanU64 runtime_address, ZydisFormatterTokenConst** token,
1132  void* user_data);
1133 
1134 /* ---------------------------------------------------------------------------------------------- */
1135 
1140 /* ============================================================================================== */
1141 
1142 #ifdef __cplusplus
1143 }
1144 #endif
1145 
1146 #endif /* ZYDIS_FORMATTER_H */
Padds the value to the current stack-width for addresses, or to the operand-width for immediate value...
Definition: Formatter.h:415
ZydisPadding disp_padding
The ZYDIS_FORMATTER_DISP_PADDING property.
Definition: Formatter.h:831
Controls the printing of branch addresses.
Definition: Formatter.h:136
Defines the ZydisFormatterBuffer struct.
Definition: FormatterBuffer.h:167
ZydisNumericBase disp_base
The ZYDIS_FORMATTER_DISP_BASE property.
Definition: Formatter.h:823
This function is invoked to print the segment-register of a memory operand.
Definition: Formatter.h:568
The suppress-all-exceptions decorator.
Definition: Formatter.h:616
Automatically choose the most suitable mode based on the operands ZydisDecodedOperand.imm.is_signed` attribute.
Definition: Formatter.h:379
ZyanBool force_memory_segment
The ZYDIS_FORMATTER_PROP_FORCE_SEGMENT property.
Definition: Formatter.h:783
ZydisFormatterStyle_
Enum selecting the syntax to format the disassembly in.
Definition: Formatter.h:66
Controls the printing of instruction prefixes.
Definition: Formatter.h:161
Information about a decoded instruction.
Definition: DecoderTypes.h:1237
ZydisFormatterFunc func_print_imm
The ZYDIS_FORMATTER_FUNC_PRINT_IMM function.
Definition: Formatter.h:952
struct ZydisFormatterContext_ ZydisFormatterContext
Context structure that that is passed to all formatter.
ZydisFormatterFunc func_print_address_abs
The ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_ABS function.
Definition: Formatter.h:940
ZydisSignedness imm_signedness
The ZYDIS_FORMATTER_IMM_SIGNEDNESS property.
Definition: Formatter.h:839
ZydisSignedness_
Enum defining the signeness of integers to be used during formatting.
Definition: Formatter.h:373
ZYDIS_EXPORT ZyanStatus ZydisFormatterTokenizeInstruction(const ZydisFormatter *formatter, const ZydisDecodedInstruction *instruction, const ZydisDecodedOperand *operands, ZyanU8 operand_count, void *buffer, ZyanUSize length, ZyanU64 runtime_address, ZydisFormatterTokenConst **token, void *user_data)
Tokenizes the given instruction and writes it into the output buffer.
The minimum number of bits required to represent all values of this enum.
Definition: Formatter.h:91
Controls the suffix for hexadecimal values.
Definition: Formatter.h:328
ZydisFormatterFunc func_pre_instruction
The ZYDIS_FORMATTER_FUNC_PRE_INSTRUCTION function.
Definition: Formatter.h:896
This function is invoked to format a memory operand.
Definition: Formatter.h:489
ZyanBool force_relative_branches
The ZYDIS_FORMATTER_PROP_FORCE_RELATIVE_BRANCHES property.
Definition: Formatter.h:791
Controls the printing of the scale-factor component for memory operands.
Definition: Formatter.h:128
Maximum value of this enum.
Definition: Formatter.h:584
This function is invoked to print a register.
Definition: Formatter.h:517
This function refers to the main formatting function.
Definition: Formatter.h:461
Controls the letter-case of hexadecimal values.
Definition: Formatter.h:300
Controls the signedness of displacement values.
Definition: Formatter.h:202
ZydisFormatterFunc func_format_operand_imm
The ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_IMM function.
Definition: Formatter.h:928
ZydisNumericBase addr_base
The ZYDIS_FORMATTER_ADDR_BASE property.
Definition: Formatter.h:807
Context structure that that is passed to all formatter.
Definition: Formatter.h:649
ZYDIS_EXPORT ZyanStatus ZydisFormatterFormatInstruction(const ZydisFormatter *formatter, const ZydisDecodedInstruction *instruction, const ZydisDecodedOperand *operands, ZyanU8 operand_count, char *buffer, ZyanUSize length, ZyanU64 runtime_address, void *user_data)
Formats the given instruction and writes it into the output buffer.
This function is invoked to print an immediate value.
Definition: Formatter.h:555
This function is invoked to print relative addresses.
Definition: Formatter.h:536
Maximum value of this enum.
Definition: Formatter.h:392
ZydisPadding imm_padding
The ZYDIS_FORMATTER_IMM_PADDING property.
Definition: Formatter.h:843
ZyanBool force_memory_scale
The ZYDIS_FORMATTER_PROP_FORCE_SCALE_ONE property.
Definition: Formatter.h:787
ZyanI32 case_registers
The ZYDIS_FORMATTER_UPPERCASE_REGISTERS property.
Definition: Formatter.h:855
enum ZydisSignedness_ ZydisSignedness
Enum defining the signeness of integers to be used during formatting.
This function is invoked before the formatter formats an operand.
Definition: Formatter.h:470
ZydisDecorator_
Enum of all decorator types.
Definition: Formatter.h:598
The minimum number of bits required to represent all values of this enum.
Definition: Formatter.h:396
const ZydisDecodedInstruction * instruction
A pointer to the ZydisDecodedInstruction struct.
Definition: Formatter.h:654
ZydisPadding addr_padding_absolute
The ZYDIS_FORMATTER_ADDR_PADDING_ABSOLUTE property.
Definition: Formatter.h:815
enum ZydisPadding_ ZydisPadding
Enum definining magic values that receive special treatment when used as padding properties of the fo...
This function is invoked to print the instruction prefixes.
Definition: Formatter.h:572
This function is invoked to print the instruction mnemonic.
Definition: Formatter.h:510
enum ZydisFormatterProperty_ ZydisFormatterProperty
Enum selecting a property of the formatter.
ZydisFormatterStyle style
The formatter style.
Definition: Formatter.h:775
Controls the letter-case for decorators.
Definition: Formatter.h:266
ZyanU64 runtime_address
The runtime address of the instruction.
Definition: Formatter.h:666
#define ZYDIS_EXPORT
Symbol is exported in shared library builds.
Definition: Defines.h:67
ZyanStatus(* ZydisFormatterRegisterFunc)(const ZydisFormatter *formatter, ZydisFormatterBuffer *buffer, ZydisFormatterContext *context, ZydisRegister reg)
Defines the ZydisFormatterRegisterFunc function prototype.
Definition: Formatter.h:737
Controls the base of displacement values.
Definition: Formatter.h:198
Controls the letter-case for prefixes.
Definition: Formatter.h:242
Generates Intel-style disassembly.
Definition: Formatter.h:75
ZydisSignedness addr_signedness
The ZYDIS_FORMATTER_ADDR_SIGNEDNESS property.
Definition: Formatter.h:811
Implements the ZydisFormatterToken type and provides functions to use it.
ZydisPadding_
Enum definining magic values that receive special treatment when used as padding properties of the fo...
Definition: Formatter.h:405
ZydisFormatterFunc func_print_segment
The ZYDIS_FORMATTER_FUNC_PRINT_SEGMENT function.
Definition: Formatter.h:960
ZydisFormatterFunc func_post_operand
The ZYDIS_FORMATTER_FUNC_POST_OPERAND function.
Definition: Formatter.h:912
ZydisSignedness disp_signedness
The ZYDIS_FORMATTER_DISP_SIGNEDNESS property.
Definition: Formatter.h:827
enum ZydisFormatterFunction_ ZydisFormatterFunction
Enum selecting a formatter function to be replaced with hooks.
Maximum value of this enum.
Definition: Formatter.h:633
Controls the base of immediate values.
Definition: Formatter.h:216
This function is invoked to print absolute addresses.
Definition: Formatter.h:529
Hexadecimal system.
Definition: Formatter.h:356
struct ZydisFormatter_::@8 number_format[ZYDIS_NUMERIC_BASE_MAX_VALUE+1][2]
The number formats for all numeric bases.
ZYDIS_EXPORT ZyanStatus ZydisFormatterFormatOperand(const ZydisFormatter *formatter, const ZydisDecodedInstruction *instruction, const ZydisDecodedOperand *operand, char *buffer, ZyanUSize length, ZyanU64 runtime_address, void *user_data)
Formats the given operand and writes it into the output buffer.
This function is invoked to print the size of a memory operand (INTEL only).
Definition: Formatter.h:564
ZyanBool force_memory_size
The ZYDIS_FORMATTER_PROP_FORCE_SIZE property.
Definition: Formatter.h:779
Controls the printing of EIP/RIP-relative addresses.
Definition: Formatter.h:144
ZyanBool force_relative_riprel
The ZYDIS_FORMATTER_PROP_FORCE_RELATIVE_RIPREL property.
Definition: Formatter.h:795
ZydisNumericBase_
Enum defining different mantissae to be used during formatting.
Definition: Formatter.h:347
Controls the signedness of relative addresses.
Definition: Formatter.h:175
Maximum value of this enum.
Definition: Formatter.h:420
ZydisFormatterFunc func_pre_operand
The ZYDIS_FORMATTER_FUNC_PRE_OPERAND function.
Definition: Formatter.h:908
ZYDIS_EXPORT ZyanStatus ZydisFormatterSetHook(ZydisFormatter *formatter, ZydisFormatterFunction type, const void **callback)
Replaces a formatter function with a custom callback and/or retrieves the currently used function...
Decimal system.
Definition: Formatter.h:352
Controls the letter-case for the mnemonic.
Definition: Formatter.h:248
This function is invoked to print a memory displacement value.
Definition: Formatter.h:544
ZydisFormatterDecoratorFunc func_print_decorator
The ZYDIS_FORMATTER_FUNC_PRINT_DECORATOR function.
Definition: Formatter.h:968
Controls the letter-case for typecasts.
Definition: Formatter.h:260
const ZyanStringView * string
A pointer to the ZyanStringView to use as prefix/suffix.
Definition: Formatter.h:883
The minimum number of bits required to represent all values of this enum.
Definition: Formatter.h:365
Controls the base of address values.
Definition: Formatter.h:170
ZyanI32 case_decorators
The ZYDIS_FORMATTER_UPPERCASE_DECORATORS property.
Definition: Formatter.h:863
The minimum number of bits required to represent all values of this enum.
Definition: Formatter.h:424
This function is invoked to format an immediate operand.
Definition: Formatter.h:501
Defines the ZydisFormatterToken struct.
Definition: FormatterBuffer.h:138
ZydisFormatterProperty_
Enum selecting a property of the formatter.
Definition: Formatter.h:101
ZYDIS_EXPORT ZyanStatus ZydisFormatterInit(ZydisFormatter *formatter, ZydisFormatterStyle style)
Initializes the given ZydisFormatter instance.
ZyanStringView string_data
The ZyanStringView to use as prefix/suffix.
Definition: Formatter.h:887
ZydisFormatterFunc func_print_disp
The ZYDIS_FORMATTER_FUNC_PRINT_DISP function.
Definition: Formatter.h:948
const ZydisDecodedOperand * operand
A pointer to the ZydisDecodedOperand struct.
Definition: Formatter.h:662
const ZydisDecodedOperand * operands
A pointer to the first ZydisDecodedOperand struct of the instruction.
Definition: Formatter.h:658
ZydisFormatterFunc func_print_address_rel
The ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_REL function.
Definition: Formatter.h:944
ZydisFormatterFunc func_format_operand_ptr
The ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_PTR function.
Definition: Formatter.h:924
This function is invoked before the formatter formats an instruction.
Definition: Formatter.h:446
ZydisFormatterFunction_
Enum selecting a formatter function to be replaced with hooks.
Definition: Formatter.h:437
void * user_data
A pointer to user-defined data.
Definition: Formatter.h:673
ZyanI32 case_prefixes
The ZYDIS_FORMATTER_UPPERCASE_PREFIXES property.
Definition: Formatter.h:847
Controls the signedness of immediate values.
Definition: Formatter.h:223
Controls the prefix for hexadecimal values.
Definition: Formatter.h:319
The minimum number of bits required to represent all values of this enum.
Definition: Formatter.h:637
ZYDIS_EXPORT ZyanStatus ZydisFormatterTokenizeOperand(const ZydisFormatter *formatter, const ZydisDecodedInstruction *instruction, const ZydisDecodedOperand *operand, void *buffer, ZyanUSize length, ZyanU64 runtime_address, ZydisFormatterTokenConst **token, void *user_data)
Tokenizes the given operand and writes it into the output buffer.
ZyanBool hex_force_leading_number
The ZYDIS_FORMATTER_HEX_FORCE_LEADING_NUMBER property.
Definition: Formatter.h:871
Controls the letter-case for registers.
Definition: Formatter.h:254
The minimum number of bits required to represent all values of this enum.
Definition: Formatter.h:339
enum ZydisDecorator_ ZydisDecorator
Enum of all decorator types.
This function is invoked to format a register operand.
Definition: Formatter.h:481
char buffer[11]
The actual string data.
Definition: Formatter.h:891
ZydisFormatterFunc func_format_operand_mem
The ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_MEM function.
Definition: Formatter.h:920
Controls whether to prepend hexadecimal values with a leading zero if the first character is non-nume...
Definition: Formatter.h:310
Controls the suffix for decimal values.
Definition: Formatter.h:289
This function is invoked after formatting an operand to print a EVEX/MVEX decorator.
Definition: Formatter.h:577
Maximum value of this enum.
Definition: Formatter.h:335
ZyanBool print_branch_size
The ZYDIS_FORMATTER_PROP_PRINT_BRANCH_SIZE property.
Definition: Formatter.h:799
ZyanStatus(* ZydisFormatterDecoratorFunc)(const ZydisFormatter *formatter, ZydisFormatterBuffer *buffer, ZydisFormatterContext *context, ZydisDecorator decorator)
Defines the ZydisFormatterDecoratorFunc function prototype.
Definition: Formatter.h:754
Controls the padding of absolute address values.
Definition: Formatter.h:183
The minimum number of bits required to represent all values of this enum.
Definition: Formatter.h:588
ZydisPadding addr_padding_relative
The ZYDIS_FORMATTER_ADDR_PADDING_RELATIVE property.
Definition: Formatter.h:819
ZydisFormatterRegisterFunc func_print_register
The ZYDIS_FORMATTER_FUNC_PRINT_REGISTER function.
Definition: Formatter.h:936
ZyanBool detailed_prefixes
The ZYDIS_FORMATTER_DETAILED_PREFIXES property.
Definition: Formatter.h:803
ZyanStatus(* ZydisFormatterFunc)(const ZydisFormatter *formatter, ZydisFormatterBuffer *buffer, ZydisFormatterContext *context)
Defines the ZydisFormatterFunc function prototype.
Definition: Formatter.h:720
enum ZydisNumericBase_ ZydisNumericBase
Enum defining different mantissae to be used during formatting.
ZydisFormatterFunc func_format_instruction
The ZYDIS_FORMATTER_FUNC_FORMAT_INSTRUCTION function.
Definition: Formatter.h:904
The eviction-hint decorator.
Definition: Formatter.h:628
Controls the printing of effective operand-size suffixes (AT&T) or operand-sizes of memory operands (...
Definition: Formatter.h:114
enum ZydisFormatterStyle_ ZydisFormatterStyle
Enum selecting the syntax to format the disassembly in.
ZyanI32 case_typecasts
The ZYDIS_FORMATTER_UPPERCASE_TYPECASTS property.
Definition: Formatter.h:859
The embedded-mask decorator.
Definition: Formatter.h:604
ZydisFormatterFunc func_post_instruction
The ZYDIS_FORMATTER_FUNC_POST_INSTRUCTION function.
Definition: Formatter.h:900
Maximum value of this enum.
Definition: Formatter.h:87
Defines the basic ZydisDecodedInstruction and ZydisDecodedOperand structs.
Generates AT&T-style disassembly.
Definition: Formatter.h:71
ZYDIS_EXPORT ZyanStatus ZydisFormatterSetProperty(ZydisFormatter *formatter, ZydisFormatterProperty property, ZyanUPointer value)
Changes the value of the specified formatter property.
The rounding-control decorator.
Definition: Formatter.h:612
The broadcast decorator.
Definition: Formatter.h:608
Controls the padding of displacement values.
Definition: Formatter.h:209
ZydisFormatterFunc func_format_operand_reg
The ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_REG function.
Definition: Formatter.h:916
ZyanI32 case_mnemonic
The ZYDIS_FORMATTER_UPPERCASE_MNEMONIC property.
Definition: Formatter.h:851
Force signed values.
Definition: Formatter.h:383
Context structure keeping track of internal state of the formatter.
Definition: Formatter.h:770
Controls the padding of relative address values.
Definition: Formatter.h:191
ZydisFormatterFunc func_print_prefixes
The ZYDIS_FORMATTER_FUNC_PRINT_PREFIXES function.
Definition: Formatter.h:964
The conversion decorator.
Definition: Formatter.h:624
Controls the prefix for decimal values.
Definition: Formatter.h:280
Controls the printing of segment prefixes.
Definition: Formatter.h:121
ZydisFormatterFunc func_print_mnemonic
The `ZYDIS_FORMATTER_FUNC_PRINT_MNEMONIC function.
Definition: Formatter.h:932
Force unsigned values.
Definition: Formatter.h:387
This function is invoked after the formatter formatted an operand.
Definition: Formatter.h:474
Defines the ZydisDecodedOperand struct.
Definition: DecoderTypes.h:199
ZyanBool hex_uppercase
The ZYDIS_FORMATTER_HEX_UPPERCASE property.
Definition: Formatter.h:867
ZydisNumericBase imm_base
The ZYDIS_FORMATTER_IMM_BASE property.
Definition: Formatter.h:835
The register-swizzle decorator.
Definition: Formatter.h:620
ZydisFormatterFunc func_print_typecast
The ZYDIS_FORMATTER_FUNC_PRINT_TYPECAST function.
Definition: Formatter.h:956
Controls the padding of immediate values.
Definition: Formatter.h:231
Controls the printing of branch-instructions sizes.
Definition: Formatter.h:153
Maximum value of this enum.
Definition: Formatter.h:361
Disables padding.
Definition: Formatter.h:410
This function is invoked to format a pointer operand.
Definition: Formatter.h:493
This function is invoked after the formatter formatted an instruction.
Definition: Formatter.h:450
Generates MASM-style disassembly that is directly accepted as input for the MASM assembler.
Definition: Formatter.h:82