C# Класс SharpDisasm.Translators.Translator

All translators must inherit from the abstract class Translator. This base class provides a number of common methods, and defines two abstract methods that must be implemented.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
Content StringBuilder
Registers string[]

Открытые методы

Метод Описание
Translate ( IEnumerable insns ) : string

Abstract method to translate multiple instructions. Classes implementing this method must reset the protected Content member instance and cleanup.

Translate ( Instruction insn ) : string

Abstract method to translate a single instruction. Classes implementing this method must reset the protected Content member instance and cleanup.

Защищенные методы

Метод Описание
RegisterForType ( SharpDisasm type ) : string

Converts a SharpDisasm.Udis86.ud_type into an index into Registers and returns the result.

WriteAddress ( Instruction insn ) : void

Writes the address of the instruction to Content. The width of the address is determined by the ArchitectureMode used during disassembly.

WriteBinary ( Instruction insn ) : void

Writes the instruction binary data to Content. The result is padded to 20 characters (supporting instructions up to 10-bytes long). If the instruction was disassembled without Disassembler.CopyBinaryToInstruction a blank 20 character string will be appended.

ud_syn_print_addr ( Instruction insn, long addr ) : void

TODO: document and rename ported translator methods

ud_syn_print_imm ( Instruction insn, Operand op ) : void

TODO: document and rename ported translator methods

ud_syn_print_mem_disp ( Instruction insn, Operand op, int sign ) : void

TODO: document and rename ported translator methods

ud_syn_rel_target ( Instruction insn, Operand opr ) : ulong

TODO: document and rename ported translator methods

Описание методов

RegisterForType() защищенный Метод

Converts a SharpDisasm.Udis86.ud_type into an index into Registers and returns the result.
protected RegisterForType ( SharpDisasm type ) : string
type SharpDisasm The register to retrieve the corresponding string for. Note: only the UD_R_* types will result in a valid index.
Результат string

Translate() публичный абстрактный Метод

Abstract method to translate multiple instructions. Classes implementing this method must reset the protected Content member instance and cleanup.
public abstract Translate ( IEnumerable insns ) : string
insns IEnumerable Collection of instructions to be translated
Результат string

Translate() публичный абстрактный Метод

Abstract method to translate a single instruction. Classes implementing this method must reset the protected Content member instance and cleanup.
public abstract Translate ( Instruction insn ) : string
insn Instruction The instruction to translate
Результат string

WriteAddress() защищенный Метод

Writes the address of the instruction to Content. The width of the address is determined by the ArchitectureMode used during disassembly.
protected WriteAddress ( Instruction insn ) : void
insn Instruction The instruction to append the address of.
Результат void

WriteBinary() защищенный Метод

Writes the instruction binary data to Content. The result is padded to 20 characters (supporting instructions up to 10-bytes long). If the instruction was disassembled without Disassembler.CopyBinaryToInstruction a blank 20 character string will be appended.
protected WriteBinary ( Instruction insn ) : void
insn Instruction The instruction of which to append the binary data for
Результат void

ud_syn_print_addr() защищенный Метод

TODO: document and rename ported translator methods
protected ud_syn_print_addr ( Instruction insn, long addr ) : void
insn Instruction
addr long
Результат void

ud_syn_print_imm() защищенный Метод

TODO: document and rename ported translator methods
protected ud_syn_print_imm ( Instruction insn, Operand op ) : void
insn Instruction
op Operand
Результат void

ud_syn_print_mem_disp() защищенный Метод

TODO: document and rename ported translator methods
protected ud_syn_print_mem_disp ( Instruction insn, Operand op, int sign ) : void
insn Instruction
op Operand
sign int
Результат void

ud_syn_rel_target() защищенный Метод

TODO: document and rename ported translator methods
protected ud_syn_rel_target ( Instruction insn, Operand opr ) : ulong
insn Instruction
opr Operand
Результат ulong

Описание свойств

Content защищенное свойство

The content being generated by the current call to the translator
protected StringBuilder Content
Результат StringBuilder

Registers защищенное статическое свойство

A list of all registers names
protected static string[] Registers
Результат string[]