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.
파일 보기 프로젝트 열기: spazzarama/SharpDisasm

보호된 프로퍼티들

프로퍼티 타입 설명
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[]