Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

Disassembler Class Reference

#include <asm.h>

Inheritance diagram for Disassembler:

Object Alphadis IA64Disassembler ILDisassembler javadis PPCDisassembler x86dis x86dis_vxd List of all members.

Public Member Functions

 Disassembler ()
 ~Disassembler ()
virtual dis_insncreateInvalidInsn ()
virtual dis_insndecode (byte *code, int maxlen, CPU_ADDR cur_address)=0
virtual dis_insnduplicateInsn (dis_insn *disasm_insn)=0
virtual void getOpcodeMetrics (int &min_length, int &max_length, int &min_look_ahead, int &avg_look_ahead, int &addr_align)=0
virtual byte getSize (dis_insn *disasm_insn)=0
virtual char * getName ()=0
virtual bool selectNext (dis_insn *disasm_insn)
virtual char * str (dis_insn *disasm_insn, int style)
virtual char * strf (dis_insn *disasm_insn, int style, char *format)=0
virtual bool validInsn (dis_insn *disasm_insn)=0

Protected Member Functions

const char * get_cs (AsmSyntaxHighlightEnum style)
void hexd (char **s, int size, int options, int imm)
void enable_highlighting ()
void disable_highlighting ()

Protected Attributes

int options
bool highlight

Constructor & Destructor Documentation

Disassembler::Disassembler  ) 
 

Definition at line 192 of file asm.cc.

References disable_highlighting().

Disassembler::~Disassembler  ) 
 

Definition at line 197 of file asm.cc.


Member Function Documentation

dis_insn * Disassembler::createInvalidInsn  )  [virtual]
 

Definition at line 204 of file asm.cc.

References dis_insn, and NULL.

virtual dis_insn* Disassembler::decode byte *  code,
int  maxlen,
CPU_ADDR  cur_address
[pure virtual]
 

Implemented in Alphadis, IA64Disassembler, ILDisassembler, javadis, PPCDisassembler, and x86dis.

Referenced by Analyser::continueAnalysis(), Analyser::dataAccess(), dialog_assemble(), Analyser::doBranch(), generate_html_output(), AnalyserOutput::generateAddr(), Analyser::getDisasmStr(), Analyser::getDisasmStrFormatted(), ht_disasm_sub::getline(), ht_disasm_viewer::handlemsg(), ht_disasm_sub::next_line_id(), and ht_disasm_sub::prev_line_id().

void Disassembler::disable_highlighting  )  [protected]
 

Definition at line 265 of file asm.cc.

References highlight.

Referenced by Disassembler(), x86dis::strf(), PPCDisassembler::strf(), javadis::strf(), ILDisassembler::strf(), IA64Disassembler::strf(), and Alphadis::strf().

virtual dis_insn* Disassembler::duplicateInsn dis_insn disasm_insn  )  [pure virtual]
 

Implemented in Alphadis, IA64Disassembler, ILDisassembler, javadis, PPCDisassembler, and x86dis.

Referenced by Analyser::continueAnalysis().

void Disassembler::enable_highlighting  )  [protected]
 

Definition at line 260 of file asm.cc.

References highlight.

Referenced by x86dis::strf(), PPCDisassembler::strf(), javadis::strf(), ILDisassembler::strf(), IA64Disassembler::strf(), and Alphadis::strf().

const char * Disassembler::get_cs AsmSyntaxHighlightEnum  style  )  [protected]
 

Definition at line 248 of file asm.cc.

References ASM_SYNTAX_COMMENT, ASM_SYNTAX_DEFAULT, ASM_SYNTAX_NUMBER, ASM_SYNTAX_STRING, ASM_SYNTAX_SYMBOL, and highlight.

Referenced by x86dis::str_format(), javadis::str_format(), x86dis::str_op(), javadis::str_op(), PPCDisassembler::strf(), ILDisassembler::strf(), IA64Disassembler::strf(), and Alphadis::strf().

virtual char* Disassembler::getName  )  [pure virtual]
 

Implemented in Alphadis, IA64Disassembler, ILDisassembler, javadis, PPCDisassembler, and x86dis.

Referenced by AnalyserInformation::idle().

virtual void Disassembler::getOpcodeMetrics int &  min_length,
int &  max_length,
int &  min_look_ahead,
int &  avg_look_ahead,
int &  addr_align
[pure virtual]
 

Implemented in Alphadis, IA64Disassembler, ILDisassembler, javadis, PPCDisassembler, and x86dis.

Referenced by ht_disasm_sub::prev_line_id(), AnalyserOutput::prevLine(), and Analyser::setDisasm().

virtual byte Disassembler::getSize dis_insn disasm_insn  )  [pure virtual]
 

Implemented in Alphadis, IA64Disassembler, ILDisassembler, javadis, PPCDisassembler, and x86dis.

Referenced by Analyser::continueAnalysis(), AnalyserOutput::generateAddr(), Analyser::getDisasmStr(), ht_disasm_sub::getline(), ht_disasm_viewer::handlemsg(), ht_disasm_sub::next_line_id(), and ht_disasm_sub::prev_line_id().

void Disassembler::hexd char **  s,
int  size,
int  options,
int  imm
[protected]
 

Definition at line 209 of file asm.cc.

References DIS_STYLE_HEX_ASMSTYLE, DIS_STYLE_HEX_CSTYLE, DIS_STYLE_HEX_NOZEROPAD, DIS_STYLE_HEX_UPPERCASE, DIS_STYLE_SIGNED, options, and size.

Referenced by x86dis::str_op(), and javadis::str_op().

bool Disassembler::selectNext dis_insn disasm_insn  )  [virtual]
 

Reimplemented in IA64Disassembler.

Definition at line 238 of file asm.cc.

References dis_insn.

Referenced by Analyser::continueAnalysis(), and AnalyserOutput::generateAddr().

char * Disassembler::str dis_insn disasm_insn,
int  style
[virtual]
 

Reimplemented in Alphadis, IA64Disassembler, ILDisassembler, javadis, PPCDisassembler, and x86dis.

Definition at line 243 of file asm.cc.

References dis_insn, DISASM_STRF_DEFAULT_FORMAT, and strf().

Referenced by Analyser::continueAnalysis(), AnalyserOutput::generateAddr(), and ht_disasm_sub::getline().

virtual char* Disassembler::strf dis_insn disasm_insn,
int  style,
char *  format
[pure virtual]
 

Implemented in Alphadis, IA64Disassembler, ILDisassembler, javadis, PPCDisassembler, and x86dis.

Referenced by dialog_assemble(), Analyser::getDisasmStr(), Analyser::getDisasmStrFormatted(), ht_disasm_viewer::handlemsg(), and str().

virtual bool Disassembler::validInsn dis_insn disasm_insn  )  [pure virtual]
 

Implemented in Alphadis, IA64Disassembler, ILDisassembler, javadis, PPCDisassembler, and x86dis.

Referenced by Analyser::continueAnalysis(), and Analyser::dataAccess().


Member Data Documentation

bool Disassembler::highlight [protected]
 

Definition at line 118 of file asm.h.

Referenced by disable_highlighting(), enable_highlighting(), and get_cs().

int Disassembler::options [protected]
 

Definition at line 117 of file asm.h.


The documentation for this class was generated from the following files:
Generated on Fri May 7 21:15:55 2004 by doxygen 1.3.5