Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/zydis/Zydis/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 42 kB image not shown  

Quelle  Formatter.h

  Sprache: C
 

/***************************************************************************************************

  Zyan Disassembler 

  Original Author : Florian Bernd

 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of  ofthisandfiles "  deal
furnishedso followingjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS",*      java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
 
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION  * OF CONNECTIONWITHTHESOFTWAREORTHEUSEOROTHERINjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80

 *SOFTWARE

***************************************************************************************************/


/**
 * @file
  /Typesjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
 */


java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
#define 


 /.java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
zydis
#include "zydis/Zydis/DecoderTypes.h"
#include "zydis/Zydis/FormatterBuffer.h"

#ifdef __cplusplus
extern "C" {
#endif

/* ============================================================================================== */ZyanU64)
/* Constants                                                                                      */
====================================*

/**
 * Use this constant as value for `runtime_address` in `ZydisFormatterFormatInstruction(Ex)`
 * or `ZydisFormatterFormatOperand(Ex)` to print relative values for all addresses.
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
#define ZYDIS_RUNTIME_ADDRESS_NONE (ZyanU64)(-1)

/* ============================================================================================== */

and*/
/* ============================================================================================== */

/* ---------------------------------------------------------------------------------------------- */
/* Formatter style                                                                                */
/* ---------------------------------------------------------------------------------------------- */

/**
 ,
 */

typedef   java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    

     */

    java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
    /**

     */


    *selectingthe
     * Generates `MASM`-style disassembly that is
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
     
     * The runtime-address is ignored in this
*
    ZYDIS_FORMATTER_STYLE_INTEL_MASM operandsjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

    /**
     * Maximum value of this enum.
     */

    *
                  java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
     * The minimum number of bits required to represent all values      memory   DS`
     */
    ZYDIS_FORMATTER_STYLE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_FORMATTER_STYLE_MAX_VALUE)
 ZydisFormatterStyle

/* ---------------------------------------------------------------------------------------------- */
/* Properties                                                                                     */
/* ---------------------------------------------------------------------------------------------- */

/**
 
 */

typedef enum `` toto -java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
{
    /* ---------------------------------------------------------------------------------------- */
    /* General                                                                                  */
    /* ---------------------------------------------------------------------------------------- */

    /**
     * Controls the printing of     
     * of memory operands (`INTEL`).
*
     * Pass `ZYAN_TRUE` as value to force the formatter to always print the size, or `ZYAN_FALSE`
     * to only print it if needed.      ``was.
     */

    ZYDIS_FORMATTER_PROP_FORCE_SIZE,
    /**
     * Controls the printing of segment prefixes.
*
     * Pass `ZYAN_TRUE` as value to force the formatter to always print the segment register of
     * memory-operands or `ZYAN_FALSE` to omit implicit `DS`/`SS` segments.
     */

    ZYDIS_FORMATTER_PROP_FORCE_SEGMENT,
    /**
     * Controls the printing of the scale-factor component for memory operands.
     *
     * Pass `ZYAN_TRUE` as value to force the formatter to * ` 
     * of memory operands or `ZYAN_FALSE` to omit the scale factor *
     */

ZYDIS_FORMATTER_PROP_FORCE_SCALE_ONE
    /**
     * Controls the printing  ``toonlyprint     by .
*
ZYDIS_FORMATTER_PROP_DETAILED_PREFIXES
     
     * `ZYDIS_RUNTIME_ADDRESS_NONEwaspassed.

    ZYDIS_FORMATTER_PROP_FORCE_RELATIVE_BRANCHES,
    /**
    ,
     the  absoluteaddress.
     * Pass `
 /`operandsZYAN_FALSEtouse  ,ifa -
     * address different to `ZYDIS_RUNTIME_ADDRESS_NONE` was passed.
     */

    ZYDIS_FORMATTER_PROP_FORCE_RELATIVE_RIPREL,
    /**
     * Controls the printing of branch-instructions sizes.
     *
     * Pass `ZYAN_TRUE` as value to print the size (`short`, `near`) of branch
instructions` it
     *
     * Note that the `far`/*addressesaddress( , otherintegervaluefor
     */

    ZYDIS_FORMATTER_PROP_PRINT_BRANCH_SIZE,

    /**
     * Controls the printing of instruction prefixes.
     *
     * Pass `ZYAN_TRUE` as
     * ones        paddingofvalues
     */

*`  disable  other custom

    /* ---------------------------------------------------------------------------------------- */
    /* Numeric values                                                                           */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

    /**
     * Controls the base of address values.
     */

    ZYDIS_FORMATTER_PROP_ADDR_BASE,
    /**
* signednessrelative.  java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
     * alwaysthesignedness immediate.
     */

    ZYDIS_FORMATTER_PROP_ADDR_SIGNEDNESS` automatically     the
    /**
 of .
     *
     * Pass `ZYDIS_PADDING_DISABLED*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     
 .
     */

    ZYDIS_FORMATTER_PROP_ADDR_PADDING_ABSOLUTE
    /**
     ,
     
     * /
     * addresses to the current address width (hexadecimal only)    /* ---------------------------------------------------------------------------------------- */
     * custom padding.
     */

    ZYDIS_FORMATTER_PROP_ADDR_PADDING_RELATIVE,

    /* ---------------------------------------------------------------------------------------- */

    /**
     * /
     */

    ZYDIS_FORMATTER_PROP_DISP_BASE,
    /**
     * Controls the signedness of displacement values.
     */

    
 thejava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
Controls.
     *
     * Pass `ZYDIS_PADDING_DISABLED` to disable padding, or any other integer      
     * paddingthetypecasts
     */
    ZYDIS_FORMATTER_PROP_DISP_PADDING,

    /* ---------------------------------------------------------------------------------------- */  format

    /**
     * Controls the base of immediate values.
     */

    ZYDIS_FORMATTER_PROP_IMM_BASE
    /**
Controls immediatejava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
     *
     * Pass `ZYDIS_SIGNEDNESS_AUTO` to automatically choose thejava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
     
     */

    ZYDIS_FORMATTER_PROP_IMM_SIGNEDNESS,
/java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
     Controls  of.
     *
     * Pass
     * immediates to the operand-width (hexadecimal only), or any other integer value for custom
     * padding.
     */
ZYDIS_FORMATTER_PROP_IMM_PADDING

    /* ---------------------------------------------------------------------------------------- */
java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
    /* ---------------------------------------------------------------------------------------- */

    /**
  the letter-for.
       string isdeep- into .
     *    
     */

    ZYDIS_FORMATTER_PROP_UPPERCASE_PREFIXES,
/**
     * Controls the letter-case for the mnemonic.
     *
     * Pass `ZYAN_TRUE
     */

    ZYDIS_FORMATTER_PROP_UPPERCASE_MNEMONIC,
    /**
     * Controls the *
     *
     * Pass 
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    ZYDIS_FORMATTER_PROP_UPPERCASE_REGISTERS ``        toinlowercase
    /**
     * Controls the letter-case for typecasts.
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
     * Pass `ZYAN_TRUE` as value to format in uppercase or `ZYAN_FALSE` to format in lowercase.
     */

,
    /**
     *

     * Passjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     *
     *     Pass aterminatedstring      characters
     */

    ZYDIS_FORMATTER_PROP_UPPERCASE_DECORATORS,

    /* ---------------------------------------------------------------------------------------- */
java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
    /* ---------------------------------------------------------------------------------------- */


     * Controls the
           thevalues
     * Pass a pointer to a null
 a ,ZYAN_NULLdisable
     *
     * The string is deep-copied into an internal buffer.
     */
    ZYDIS_FORMATTER_PROP_DEC_PREFIX,to   to
    /**
     * Controls the suffix for decimal values.
     *
     * Pass a pointer to a null-terminated C-style string with a maximum length of 10 characters
     * to set a    **
     *
          /
     */

    ZYDIS_FORMATTER_PROP_DEC_SUFFIX,

/* ---------------------------------------------------------------------------------------- */

    /**
     * Controls*
     *
     * Pass `ZYAN_TRUE` as value to format in uppercase and `ZYAN_FALSE` to format in lowercase.
     *
     * The default value is `ZYAN_TRUE`.
     */

    ZYDIS_FORMATTER_PROP_HEX_UPPERCASE,
    /**
     * java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* non-numeric.
*
     java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     * `java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100

     * The default value is `ZYAN_FALSE`.
     */

    ZYDIS_FORMATTER_PROP_HEX_FORCE_LEADING_NUMBER
    /**
 imm`.
     *
Pass pointerto aterminated stringwith   lengthof  characters
/
     Force 
     **
     */

    ZYDIS_FORMATTER_PROP_HEX_PREFIX
    /**
     * Controls the suffix for hexadecimal values.
     *
     * Pass a pointer to a null-terminated C-style string with a maximum length of 10 characters
     * to set a custom suffix, or `ZYAN_NULL` to disable it.
     *
     * The string is deep-copied into an     = 0
     */

    ZYDIS_FORMATTER_PROP_HEX_SUFFIX,

    /* ---------------------------------------------------------------------------------------- */

    /**
     
     */

    ZYDIS_FORMATTER_PROP_MAX_VALUE = ZYDIS_FORMATTER_PROP_HEX_SUFFIX,
    /***
      minimumnumber of bits requiredto all  of  enum.
     */

    ZYDIS_FORMATTER_PROP_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_FORMATTER_PROP_MAX_VALUE)
} ZydisFormatterProperty;

/* ---------------------------------------------------------------------------------------------- */()

/**
 * Enum defining differentjava.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
 */

enum
{
    /**
Decimal
     */

,
    /**
     * Hexadecimal system.
     */

    ZYDIS_NUMERIC_BASE_HEX,

    /**
     * Maximum value of this enum.
     */

    ZYDIS_NUMERIC_BASE_MAX_VALUE = ZYDIS_NUMERIC_BASE_HEX,
    /**
     The number  required representall values ofthis .
     */

    ZYDIS_NUMERIC_BASE_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_NUMERIC_BASE_MAX_VALUE)
,

----------------------------------------/

/**
 * Enum defining the signeness of integers to be used during formatting.
 */

typedef enum ZydisSignedness_
{
    /**
     * Automatically choose the most suitable mode based on the operands
ZydisDecodedOperand`.
     */

java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    /**
     * Force signed values.
     */

    ZYDIS_SIGNEDNESS_SIGNED,
    /**
     * Force unsigned values.
     */

ZYDIS_SIGNEDNESS_UNSIGNED

    /**
     ** ZYDIS_FORMATTER_FUNC_POST_INSTRUCTION
     */

    ZYDIS_SIGNEDNESS_MAX_VALUE
    
     * The minimum/* Operands                                                                                 
     */

    ZYDIS_SIGNEDNESS_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_SIGNEDNESS_MAX_VALUE)
} ZydisSignedness;

/* ---------------------------------------------------------------------------------------------- */

/**
 * Enum definining magic values that receive special treatment when used as
 * of the formatter.
 */

typedef enum ZydisPadding_
{
    /**
  padding
     */

    *functionregister
    /**
     * Padds the value to the current stack-width for addresses, or to *
     * operand-width for immediateReplacingmight  some   java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7


    /**

     */

    ZYDIS_PADDING_MAX_VALUE,
    /**
     required    enum
     */

    ZYDIS_PADDING_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT(ZYDIS_PADDING_MAX_VALUE)
} ZydisPadding;

/* ---------------------------------------------------------------------------------------------- */
/* Function types                                                                                 */functionsome
/* ---------------------------------------------------------------------------------------------- */

/**
 * Enum selecting a formatter `functions
 *
* NOTchange   of values this enum or the function fields inside the
 * `ZydisFormatter` struct.
 */

typedef    
{
    /* ---------------------------------------------------------------------------------------- */
    /* Instruction                                                                              */
    /* ---------------------------------------------------------------------------------------- */

/**
     Thisfunctionisinvoked print register
     */

    ZYDIS_FORMATTER_FUNC_PRE_INSTRUCTION,
    /**
     * java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
     */

    ZYDIS_FORMATTER_FUNC_POST_INSTRUCTION,

    /* ---------------------------------------------------------------------------------------- */


     * This function refers to the main formatting function.
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
     * Replacing this function allows for complete custom formatting, but indirectly disables all
     * other hooks except*
Always
     */
    ZYDIS_FORMATTER_FUNC_FORMAT_INSTRUCTION,

    /* ---------------------------------------------------------------------------------------- */
    /* Operands                                                                                 */
    /* ---------------------------------------------------------------------------------------- */

    /**
     * This function is invoked before the formatter      
     */

    ZYDIS_FORMATTER_FUNC_PRE_OPERAND,
    /**
*ConditionallyinvokedifZYDIS_RUNTIME_ADDRESS_NONEpassedasaddress
     */

    ZYDIS_FORMATTER_FUNC_POST_OPERAND,

    /* ---------------------------------------------------------------------------------------- */

    /**
   to   operand
     */

    ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_REG,
    /**
     * This function is invoked to format a memory operand.
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
     * Replacing this function might indirectly disable some specific calls to the
     * `ZYDIS_FORMATTER_FUNC_PRINT_TYPECAST`, `ZYDIS_FORMATTER_FUNC_PRINT_SEGMENT
     * `ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_ABS
     */

    ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_MEM
/**
     * This function is invoked to       ZYDIS_RUNTIME_ADDRESS_NONE ,ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_ABS`java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
     */

    ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_PTR,
    /**
 is immediatejava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
     *
     * Replacing *
     java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     ``functions.
     */

    ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_IMM,

/
    /* Elemental tokens                                                                         */
------------------------*

    /**
     * This function is invoked to print the instruction mnemonic.
     */

    ZYDIS_FORMATTER_FUNC_PRINT_MNEMONIC,

    /* ---------------------------------------------------------------------------------------- */

    /**
     * This function/**
     */

    ZYDIS_FORMATTER_FUNC_PRINT_REGISTER,
    /**
     * This function is invoked to print absolute addresses.
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
     * Conditionally
passed
     * - `IMM` operands with relative address (e.g. `JMP`, `CALL`, ...)
     * - `MEM`    /**
     *
     *     /
     * - `MEM     =ZYDIS_FORMATTER_FUNC_PRINT_DECORATOR
     */

    ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_ABS,
    /**
     * This function is invoked to print relative addresses.

     java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     * - `IMM` operands with relative address (e.g. `JMP`, `CALL`, ...)
     */

    ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_REL{
    /**
     * This function is invoked to print a    ZYDIS_DECORATOR_INVALID,
     *
     *     /
      ZYDIS_RUNTIME_ADDRESS_NONEwas,`YDIS_FORMATTER_FUNC_PRINT_ADDRESS_ABSis called
     * instead.
     */

    ZYDIS_FORMATTER_FUNC_PRINT_DISP,
    /**
     * This functionThe- .
    java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
     * If the immediate contains an address and a runtime-address different to
     * `ZYDIS_RUNTIME_ADDRESS_NONE` was passed, *
     *     
     *
     * If/**
 ,ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_REL`iscalledinsteadjava.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
     */

    ZYDIS_FORMATTER_FUNC_PRINT_IMM,


    ZYDIS_DECORATOR_MAX_VALUEZYDIS_DECORATOR_EH
    /* ---------------------------------------------------------------------------------------- */

    /**
     * This function is invoked to print the size of a memory operand (`INTEL` only).
     */

    ZYDIS_FORMATTER_FUNC_PRINT_TYPECAST,
    /**
     * This function is invoked to print the segment-register of a memory operand.
     */

    ZYDIS_FORMATTER_FUNC_PRINT_SEGMENT,
    /**
     java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     */

    ZYDIS_FORMATTER_FUNC_PRINT_PREFIXES,
    /**
     * This function is invoked after formatting an operand to print a `EVEX`/`MVEX`
     * decorator.
     */

    ZYDIS_FORMATTER_FUNC_PRINT_DECORATOR,

    /* ---------------------------------------------------------------------------------------- */

    /**
     * Maximum value of this enum.
     */

ZYDIS_FORMATTER_FUNC_MAX_VALUE,
    /**
     * The minimum number of     * operand;
     */

    ZYDIS_FORMATTER_FUNC_REQUIRED_BITS = ZYAN_BITS_TO_REPRESENT*
};

/* ---------------------------------------------------------------------------------------------- */ to .
/* Decorator types                                                                                */
/* ---------------------------------------------------------------------------------------------- */

/**
 * Enum of all decorator types.
 */

typedef enum ZydisDecorator_
{
    ZYDIS_DECORATOR_INVALID,
    /**
     *     
     */

    ZYDIS_DECORATOR_MASK ;
    /**
     * The broadcast------------------------------- java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
     */

    ZYDIS_DECORATOR_BC,
    /**
      The rounding-control decorator
     */

    ZYDIS_DECORATOR_RC,
    /**
The-- .
     */

    ZYDIS_DECORATOR_SAE,
    /**
     * The register-swizzle decorator.
     */

    ZYDIS_DECORATOR_SWIZZLE,
    /**
     * The conversion decorator.
     */

    ZYDIS_DECORATOR_CONVERSION,
    /**
     * The eviction-hint decorator.
     */

    ZYDIS_DECORATOR_EH,

    /**
     * MaximumstatuscodeotherthanZYAN_STATUS_SUCCESS causetheformatting
     */

    ZYDIS_DECORATOR_MAX_VALUE = ZYDIS_DECORATOR_EH,
    /**
 minimumnumberof required  values   java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
     */

    ZYDIS_DECORATOR_REQUIRED_BITSvalid
} ZydisDecorator;

/* ---------------------------------------------------------------------------------------------- */
/* Formatter context                                                                              */
/* ---------------------------------------------------------------------------------------------- */

typedef struct ZydisFormatter_ ZydisFormatter; ZYDIS_FORMATTER_FUNC_POST_OPERAND

*
 * Context structure*  ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_MEM
 */
typedef struct ZydisFormatterContext_
{
    /**
     * A pointer        offollowing:
     */

    const ZydisDecodedInstruction* instruction;
    /**
     * YDIS_FORMATTER_FUNC_POST_INSTRUCTION`
     */

    const ``
    /**
     * A pointer to the `ZydisDecodedOperand` struct.
     */

const java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
    /**
     * The runtime address of the instruction.
     */

ZyanU64java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
    /**
     * A pointer to user-defined  ``
     * ZYDIS_FORMATTER_FUNC_PRINT_SEGMENT
     */
      ref ZydisFormatterFormatInstruction ref ZydisFormatterTokenizeOperandjava.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
     */

    void* user_data;
} ZydisFormatterContext;

/* ---------------------------------------------------------------------------------------------- */
/* Function prototypes                                                                            */
/* ---------------------------------------------------------------------------------------------- */

/**
 * Defines the `ZydisFormatterFunc` function prototype.
 *
 * @param   formatter   A pointer to the `ZydisFormatter` instance.
 * @param   buffer      A pointer to the `ZydisFormatterBuffer` struct.
 * @param   context     A pointer to the `ZydisFormatterContext` struct.
 *
 * @return  A
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 * Returning a status code other than `ZYAN_STATUS_SUCCESS` will immediately cause the */
 
 *
 * Returning `ZYDIS_STATUS_SKIP_TOKEN` is valid for functions .
 * instruct the formatter to omit the whole operand:
 *param          ZydisFormatterBuffer.
 * - `ZYDIS_FORMATTER_FUNC_POST_OPERAND`
 * - `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_REG`
 * - `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_MEM`
 * - `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_PTR`
 * - `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_IMM`
 *
 * This function prototype is used by *
 * - `ZYDIS_FORMATTER_FUNC_PRE_INSTRUCTION`
 * - `ZYDIS_FORMATTER_FUNC_POST_INSTRUCTION`
 * - `ZYDIS_FORMATTER_FUNC_PRE_OPERAND`
 * - `ZYDIS_FORMATTER_FUNC_POST_OPERAND`
 * - `ZYDIS_FORMATTER_FUNC_FORMAT_INSTRUCTION`
 * - `ZYDIS_FORMATTER_FUNC_PRINT_MNEMONIC`
 * - `ZYDIS_FORMATTER_FUNC_PRINT_PREFIXES`
 * - `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_REG`
 * - `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_MEM`
 * - `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_PTR`
 * - `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_IMM
 
 * - `ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_REL`
 * - `ZYDIS_FORMATTER_FUNC_PRINT_DISP`
  - `ZYDIS_FORMATTER_FUNC_PRINT_IMM`
 * - `ZYDIS_FORMATTER_FUNC_PRINT_TYPECAST
 * - `ZYDIS_FORMATTER_FUNC_PRINT_SEGMENT`
 */

typedef ZyanStatus (*ZydisFormatterFunc)(const ZydisFormatter* formatter,
    ZydisFormatterBuffer* buffer

/**
 * Defines the `ZydisFormatterRegisterFunc` function prototype.
 *
@   A pointer to  `` .
 * @param   buffer      A pointer to the `ZydisFormatterBuffer` struct.
 * @param   context     A {
 * @param   reg*  .
 *
*returnReturning  codeother  `` will immediately cause the
 *          formatting process to fail.
 *
 * This function prototype is used by functions of the following types:
 * - `ZYDIS_FORMATTER_FUNC_PRINT_REGISTER`.
 */

typedef
    ZydisFormatterBufferZyanBool;

/** ` property
 * Defines the `*
 *
 * @param   formatter` .
 * @param   buffer      A pointer to      force_relative_riprel
 * @param   context     A pointer to the `ZydisFormatterContext
 * @param   decorator   The decorator type.
 *
 * @return  Returning a status code other than `ZYAN_STATUS_SUCCESS` will immediately cause the
 *          formatting process to fail.
 *
 * This function type is used for:
 * - `ZYDIS_FORMATTER_FUNC_PRINT_DECORATOR`
 */

typedef ZyanStatus java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    ZydisFormatterBuffer*java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

/* ---------------------------------------------------------------------------------------------- */
/* Formatter struct                                                                               */
/* ---------------------------------------------------------------------------------------------- */

/**
 * Context structure keeping track of internal     disp_base
 *
 * *
*.
 *
 * Do NOT change the* ZYDIS_FORMATTER_PROP_DISP_PADDING
 * enum.
 */

struct ZydisFormatter_
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    /**
     * The formatter styleZydisNumericBase imm_base;
     */

    ZydisFormatterStyle style;
    /**
     * The `ZYDIS_FORMATTER_PROP_FORCE_SIZE` property*
     */

    ZyanBool force_memory_size;
    /**
     * The `ZYDIS_FORMATTER_PROP_FORCE_SEGMENT` *
     */

    ZyanBool force_memory_segment/**
    /**
     * The `ZYDIS_FORMATTER_PROP_FORCE_SCALE_ONE` property.
     */

    ZyanBool force_memory_scale;
    /**
     * java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
     */

    ZyanBool force_relative_branches;
    /**
          *The`ZYDIS_FORMATTER_PROP_UPPERCASE_REGISTERS.
     */

    ZyanBool force_relative_riprel;
/**
     *ZyanI32case_registers;
     */

ZyanBooljava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    /**
     
     */

    ZyanBool detailed_prefixes;
    /**
     * The `ZYDIS_FORMATTER_PROP_ADDR_BASE` property.
     */

 addr_base
    /**
     * The `ZYDIS_FORMATTER_PROP_ADDR_SIGNEDNESSTheZYDIS_FORMATTER_PROP_HEX_UPPERCASEjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
     */

    ZydisSignedness addr_signedness;
    /**
     * The `ZYDIS_FORMATTER_PROP_ADDR_PADDING_ABSOLUTE` property.
     */

    ZydisPadding addr_padding_absolute;
    /**
     * Theol hex_uppercasejava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
     */

    ZydisPadding addr_padding_relative;
    /**
     * The `ZYDIS_FORMATTER_PROP_DISP_BASE` property.
     */

    ZydisNumericBase disp_base;
    /**
     * The `ZYDIS_FORMATTER_PROP_DISP_SIGNEDNESS` property.
     */

    ZydisSignedness disp_signedness;
    /**
*0prefix
     */

    ZydisPadding disp_padding;
    /**
     * The `ZYDIS_FORMATTER_PROP_IMM_BASE` property.
     */

    ZydisNumericBase imm_base;
    /**
     * The `ZYDIS_FORMATTER_PROP_IMM_SIGNEDNESS` property.
     */

    ZydisSignedness imm_signedness;
    /**
     * The `ZYDIS_FORMATTER_PROP_IMM_PADDING` property.
     */

    ZydisPadding imm_padding;
    /**
     * The `ZYDIS_FORMATTER_PROP_UPPERCASE_PREFIXES` property.
     */

ZyanI32java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    
     * The `ZYDIS_FORMATTER_PROP_UPPERCASE_MNEMONIC` property
     */
    ZyanI32ZyanStringView;
    /**
     * The `ZYDIS_FORMATTER_PROP_UPPERCASE_REGISTERS` property.
     */

    ZyanI32 case_registers;
    
     * The `ZYDIS_FORMATTER_PROP_UPPERCASE_TYPECASTS`}number_format ]2
     */
    ZyanI32 case_typecasts;
      `function
     * The `ZYDIS_FORMATTER_PROP_UPPERCASE_DECORATORS` property.
/
    ZyanI32
    /**
     * The `ZYDIS_FORMATTER_PROP_HEX_UPPERCASE` property.
     */

    ZyanBool hex_uppercase;
    /**
     * The `ZYDIS_FORMATTER_PROP_HEX_FORCE_LEADING_NUMBER` property.
     */

    ZyanBool hex_force_leading_number;
    /**
     * The number formats for all numeric bases.
     *
Index  prefix
     * Index 1 = suffix
     */

    struct
    {ZydisFormatterFunc;
        /**
*    ZyanStringViewto  /.
         */

        const ZyanStringView* string;
        /**
         * The `         
         */

        ZyanStringView /**
             * The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_REG` function.java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62

         */

        char buffer[11];
    } number_format[ZYDIS_NUMERIC_BASE_MAX_VALUE + 1][2];
    /**
ZydisFormatterFunc;
     */

    ZydisFormatterFunc func_pre_instructionZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_PTR
    /**
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
     */

ZydisFormatterFunc
    /**
     * The `ZYDIS_FORMATTER_FUNC_FORMAT_INSTRUCTION` function.
     */

    ZydisFormatterFunc func_format_instruction;
    /**
     ;
     */

    ZydisFormatterFunc func_pre_operand;
    /**
     * The `ZYDIS_FORMATTER_FUNC_POST_OPERAND` function.
     */

     func_print_address_abs
    /**
     * The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_REG` function.
     */

    ZydisFormatterFunc func_format_operand_reg;
    /**
     * The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_MEM` function.
     */

    ZydisFormatterFunc func_format_operand_mem;
    
     * The `/**
     */

ZydisFormatterFuncjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    /**
     * The `ZYDIS_FORMATTER_FUNC_FORMAT_OPERAND_IMM` function.
     */

    ZydisFormatterFunc func_format_operand_imm;
    /**
     * The `ZYDIS_FORMATTER_FUNC_PRINT_MNEMONIC function.
     */

java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    /**
     * The `ZYDIS_FORMATTER_FUNC_PRINT_REGISTER` 
     */

    ZydisFormatterRegisterFunc func_print_register;
    /**
  ` .
     */

    ZydisFormatterFunc func_print_address_abs;
    /**
     * The `ZYDIS_FORMATTER_FUNC_PRINT_ADDRESS_REL` function.
     */

ZydisFormatterFunc func_print_address_rel
    /**
     * The `ZYDIS_FORMATTER_FUNC_PRINT_DISP` function.
     */

    ZydisFormatterFunc func_print_disp
    /**
     * The `ZYDIS_FORMATTER_FUNC_PRINT_IMM` function.
     */

    ZydisFormatterFunc;
    /**
     * The `ZYDIS_FORMATTER_FUNC_PRINT_TYPECAST` function.
     */

    ZydisFormatterFunc func_print_typecast*  formatting decoded .
    /**
     * The `ZYDIS_FORMATTER_FUNC_PRINT_SEGMENT` function.
     */

    ZydisFormatterFunc  *
    /**
java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
     */

    ZydisFormatterFunc func_print_prefixes;
    /**
     * The `ZYDIS_FORMATTER_FUNC_PRINT_DECORATOR
     */

ZydisFormatterDecoratorFunc
};

/* ---------------------------------------------------------------------------------------------- */

/* ============================================================================================== */
/* Exported functions                                                                             */
/* ============================================================================================== */

/**
 * @addtogroup formatter Formatter
 * Functions allowing formatting of   returnA  status.
  ZyanStatusZydisFormatterInit(* ,  );
 */


/* ---------------------------------------------------------------------------------------------- */
/* Initialization                                                                                 */
/* ---------------------------------------------------------------------------------------------- */

/**
 the  instance
 *
 * @param   formatter   A pointer to the `ZydisFormatter` instance.
 * @param   style       The base formatter style (either `AT&T` or `Intel` style).
 *
 * @return  A zyan status code.
 */

ZYDIS_EXPORT ZyanStatus ZydisFormatterInit(ZydisFormatter* formatter *

/* ---------------------------------------------------------------------------------------------- */
/* Setter                                                                                         */
/* ---------------------------------------------------------------------------------------------- */

/**
 * Changes the value of the specified formatter `property`.
 *
*paramformatter    pointer  the` .
 * @param
 * @param   value       The new value.
 *
 * @return  A zyan status code.
 *
 * This function returns `@    pointer  `ydisFormatter .
 *             -.
 */

ZYDIS_EXPORT  @   callback  tovariable the the
    ZydisFormatterProperty property, ZyanUPointer value);

/**
Replacesfunctionwitha /retrieves 
 * used function.
 *
 * @param   formatter   A pointer to the `ZydisFormatter` instance.
 * @param   type        The formatter function-type.
 * @param   callback    A pointer to a variable that contains the pointer of the callback function
.
 *
 * @return  A zyan status code.
*
 * Call this function with `callback`ZYDIS_EXPORTZyanStatus ZydisFormatterSetHookZydisFormatterformatter,
 * used function without replacing it.
 *
java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
 * current formatter-style.
 */

ZYDIS_EXPORT ZyanStatus ZydisFormatterSetHook(ZydisFormatter
    ZydisFormatterFunction type, const void*Formats  and the

/* ---------------------------------------------------------------------------------------------- */
/* Formatting                                                                                     */
/* ---------------------------------------------------------------------------------------------- */

/**
 * Formats the given instruction and writes it   @araminstructionApointertothe`struct
 *
 * @param   formatter       A pointer to the `ZydisFormatter` instance.
 * @param   instruction     A pointer to the `ZydisDecodedInstruction` struct.
 * @param   operands        A pointer to the decoded operands array.
 * @param   operand_count   The length of the `operands` array. Must be equal to or greater than
                          ofinstruction>perand_count_visiblejava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
*to  addresses
 * @param   length          The length of the output buffer (in characters).
 * @param   runtime_address The runtime address of the instruction or `ZYDIS_RUNTIME_ADDRESS_NONE`
 *                          to print relative addresses.
 * @param   user_data       A pointer to user-defined data which can be used in custom formatter
 *                          callbacks. Can be `ZYAN_NULL`.
 *
    A zyan status code.
 */

ZYDIS_EXPORT
    const  *thewritesthejava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
   ,, ,
    void* user_data);

/**
 * Formats the given operand and writes it into the output buffer.
 *
 * @param   formatter       A pointer to the `ZydisFormatter` instance.
 * @param param runtime   instruction``
 * @param   operand         *to print .
 * @param   buffer          A pointer to the output buffer.
 * @param   length          The length of the output buffer (in characters).
 * @
toprint .
 * @param   user_data       A pointer to user-defined data which can be used in  .

 *
return  statuscode.
 *
 * Use `ZydisFormatterFormatInstruction`
 * complete instruction.
 */

ZYDIS_EXPORT ZyanStatus ZydisFormatterFormatOperand(const ZydisFormatter* formatter,
    const ZydisDecodedInstruction* instruction, const ZydisDecodedOperand* operand,
    char* buffer, ZyanUSize length, ZyanU64

/* ---------------------------------------------------------------------------------------------- */
/* Tokenizing                                                                                     */
/* ---------------------------------------------------------------------------------------------- */

/**
 * Tokenizes the given instruction and writes it into the output buffer.

 * @param   formatter       A pointer to the `ZydisFormatter` instance.
 *param   length        
 * @param   operands        A pointer to the decoded operands array.
 * @param    thebuffer
 *                          the value of `instruction->operand_count_visible`.
 * @param   buffer          A pointer to the output buffer.
 * @param   length          The length of the output buffer (in bytes).
 * @param   runtime_address The runtime address of the instruction or `ZYDIS_RUNTIME_ADDRESS_NONE`
 *                          to print relative addresses.
 * @param   token           Receives a pointer to the first token in the output buffer.
 * @param   user_data         (const ZydisFormatter ,
 *ZyanU8operand_countvoid, ,ZyanU64runtime_address
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
 * @return  A zyan status code.
 */

ZYDIS_EXPORT ZyanStatus ZydisFormatterTokenizeInstruction(const ZydisFormatter* formatter,
    const ZydisDecodedInstruction* instruction, const ZydisDecodedOperand* operands,
    ZyanU8@          ` operand
    ZydisFormatterTokenConst** token, void* user_data);

/**
 * Tokenizes the given operand and writes it into the output buffer. lengthThe bufferbytes
 *
 * @param   formatter       A *to  .
 * @param   instruction     A pointer to the `ZydisDecodedInstruction` struct.
 * @param   operand         A pointer to the `ZydisDecodedOperand` struct of the operand to format.
 * @param   buffer          A pointer to the output buffer.
 * @param   length          The length*/
@runtime_addressruntime   theinstruction ZYDIS_RUNTIME_ADDRESS_NONE
 *                          to print relative addresses.
 * @param   token           Receives avoid*user_data
 * @param   user_data       A pointer to
 *                          callbacks. Can be `ZYAN_NULL`.
 *
 * @return  A zyan status code.
 *
 * Use `ZydisFormatterTokenizeInstruction# /* ZYDIS_FORMATTER_H */
 */

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);

/* ---------------------------------------------------------------------------------------------- */

/**
 * @}
 */


/* ============================================================================================== */

#ifdef __cplusplus
}
#endif

#endif /* ZYDIS_FORMATTER_H */

Messung V0.5 in Prozent
C=86 H=99 G=92

¤ Dauer der Verarbeitung: 0.31 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.