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

asm.h File Reference

#include "common.h"

Go to the source code of this file.

Classes

struct  asm_code
class  Assembler
struct  CPU_ADDR
class  Disassembler

Defines

#define CPU_X86   1
#define MAX_INSN_SIZE   16
#define DIS_STYLE_HIGHLIGHT   0x80000000
#define DIS_STYLE_HEX_CSTYLE   0x40000000
#define DIS_STYLE_HEX_ASMSTYLE   0x20000000
#define DIS_STYLE_HEX_UPPERCASE   0x10000000
#define DIS_STYLE_HEX_NOZEROPAD   0x08000000
#define DIS_STYLE_SIGNED   0x04000000
#define DIS_STYLE_TABSIZE   8
#define DISASM_STRF_VAR   '%'
#define DISASM_STRF_COND   '?'
#define DISASM_STRF_PREFIX   'p'
#define DISASM_STRF_NAME   'n'
#define DISASM_STRF_FIRST   '1'
#define DISASM_STRF_SECOND   '2'
#define DISASM_STRF_THIRD   '3'
#define DISASM_STRF_DEFAULT_FORMAT   "?p#%p #%n\t%1?2#, %2?3/, %3/#"
#define DISASM_STRF_SMALL_FORMAT   "?p#%p #%n?1- %1?2#,%2?3/,%3/#-"
#define ATOM_DISASM_X86   MAGICD("DIS\x01")
#define ATOM_DISASM_ALPHA   MAGICD("DIS\x02")
#define ATOM_DISASM_JAVA   MAGICD("DIS\x03")
#define ATOM_DISASM_IA64   MAGICD("DIS\x04")
#define ATOM_DISASM_IL   MAGICD("DIS\x05")
#define ATOM_DISASM_X86_VXD   MAGICD("DIS\x06")
#define ATOM_DISASM_PPC   MAGICD("DIS\x07")
#define ASM_SYNTAX_DEFAULT   "\\@d"
#define ASM_SYNTAX_COMMENT   "\\@#"
#define ASM_SYNTAX_NUMBER   "\\@n"
#define ASM_SYNTAX_SYMBOL   "\\@c"
#define ASM_SYNTAX_STRING   "\\@s"

Typedefs

typedef void dis_insn
typedef void asm_insn

Enumerations

enum  AsmSyntaxHighlightEnum {
  e_cs_default = 0, e_cs_comment, e_cs_number, e_cs_symbol,
  e_cs_string
}

Functions

bool init_asm ()
void done_asm ()

Variables

char *(* addr_sym_func )(CPU_ADDR addr, int *symstrlen, void *context)
void * addr_sym_func_context


Define Documentation

#define ASM_SYNTAX_COMMENT   "\\@#"
 

Definition at line 179 of file asm.h.

Referenced by Disassembler::get_cs().

#define ASM_SYNTAX_DEFAULT   "\\@d"
 

Definition at line 178 of file asm.h.

Referenced by Disassembler::get_cs().

#define ASM_SYNTAX_NUMBER   "\\@n"
 

Definition at line 180 of file asm.h.

Referenced by Disassembler::get_cs().

#define ASM_SYNTAX_STRING   "\\@s"
 

Definition at line 182 of file asm.h.

Referenced by Disassembler::get_cs().

#define ASM_SYNTAX_SYMBOL   "\\@c"
 

Definition at line 181 of file asm.h.

Referenced by Disassembler::get_cs().

#define ATOM_DISASM_ALPHA   MAGICD("DIS\x02")
 

Definition at line 171 of file asm.h.

Referenced by done_asm(), init_asm(), and Alphadis::object_id().

#define ATOM_DISASM_IA64   MAGICD("DIS\x04")
 

Definition at line 173 of file asm.h.

Referenced by done_asm(), init_asm(), and IA64Disassembler::object_id().

#define ATOM_DISASM_IL   MAGICD("DIS\x05")
 

Definition at line 174 of file asm.h.

#define ATOM_DISASM_JAVA   MAGICD("DIS\x03")
 

Definition at line 172 of file asm.h.

Referenced by done_asm(), init_asm(), and javadis::object_id().

#define ATOM_DISASM_PPC   MAGICD("DIS\x07")
 

Definition at line 176 of file asm.h.

Referenced by done_asm(), init_asm(), and PPCDisassembler::object_id().

#define ATOM_DISASM_X86   MAGICD("DIS\x01")
 

Definition at line 170 of file asm.h.

Referenced by done_asm(), init_asm(), x86dis::object_id(), and test_srt().

#define ATOM_DISASM_X86_VXD   MAGICD("DIS\x06")
 

Definition at line 175 of file asm.h.

Referenced by done_asm(), init_asm(), and x86dis_vxd::object_id().

#define CPU_X86   1
 

Definition at line 26 of file asm.h.

#define DIS_STYLE_HEX_ASMSTYLE   0x20000000
 

Definition at line 97 of file asm.h.

Referenced by dialog_assemble(), Analyser::getDisasmStr(), Analyser::getDisasmStrFormatted(), ht_disasm_viewer::handlemsg(), Disassembler::hexd(), AnalyserTxtOutput::init(), AnalyserOutput::init(), and srt_x86().

#define DIS_STYLE_HEX_CSTYLE   0x40000000
 

Definition at line 96 of file asm.h.

Referenced by Disassembler::hexd().

#define DIS_STYLE_HEX_NOZEROPAD   0x08000000
 

Definition at line 99 of file asm.h.

Referenced by dialog_assemble(), Analyser::getDisasmStr(), Analyser::getDisasmStrFormatted(), ht_disasm_viewer::handlemsg(), Disassembler::hexd(), AnalyserTxtOutput::init(), AnalyserOutput::init(), and srt_x86().

#define DIS_STYLE_HEX_UPPERCASE   0x10000000
 

Definition at line 98 of file asm.h.

Referenced by Disassembler::hexd().

#define DIS_STYLE_HIGHLIGHT   0x80000000
 

Definition at line 95 of file asm.h.

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

#define DIS_STYLE_SIGNED   0x04000000
 

Definition at line 100 of file asm.h.

Referenced by Disassembler::hexd().

#define DIS_STYLE_TABSIZE   8
 

Definition at line 102 of file asm.h.

Referenced by x86dis::str_format().

#define DISASM_STRF_COND   '?'
 

Definition at line 159 of file asm.h.

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

#define DISASM_STRF_DEFAULT_FORMAT   "?p#%p #%n\t%1?2#, %2?3/, %3/#"
 

Definition at line 167 of file asm.h.

Referenced by x86dis::str(), javadis::str(), and Disassembler::str().

#define DISASM_STRF_FIRST   '1'
 

Definition at line 163 of file asm.h.

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

#define DISASM_STRF_NAME   'n'
 

Definition at line 162 of file asm.h.

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

#define DISASM_STRF_PREFIX   'p'
 

Definition at line 161 of file asm.h.

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

#define DISASM_STRF_SECOND   '2'
 

Definition at line 164 of file asm.h.

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

#define DISASM_STRF_SMALL_FORMAT   "?p#%p #%n?1- %1?2#,%2?3/,%3/#-"
 

Definition at line 168 of file asm.h.

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

#define DISASM_STRF_THIRD   '3'
 

Definition at line 165 of file asm.h.

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

#define DISASM_STRF_VAR   '%'
 

Definition at line 158 of file asm.h.

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

#define MAX_INSN_SIZE   16
 

Definition at line 28 of file asm.h.


Typedef Documentation

typedef void asm_insn
 

Definition at line 50 of file asm.h.

Referenced by x86asm::alloc_insn(), Assembler::alloc_insn(), dialog_assemble(), x86asm::encode(), Assembler::encode(), x86asm::opmem(), x86asm::translate_str(), and Assembler::translate_str().

typedef void dis_insn
 

Definition at line 49 of file asm.h.

Referenced by AnalyIA64Disassembler::branchAddr(), Disassembler::createInvalidInsn(), x86dis_vxd::decode(), x86dis::decode(), PPCDisassembler::decode(), javadis::decode(), ILDisassembler::decode(), IA64Disassembler::decode(), Alphadis::decode(), dialog_assemble(), x86dis::duplicateInsn(), PPCDisassembler::duplicateInsn(), javadis::duplicateInsn(), ILDisassembler::duplicateInsn(), IA64Disassembler::duplicateInsn(), Alphadis::duplicateInsn(), ht_disasm_sub::getline(), x86dis::getSize(), PPCDisassembler::getSize(), javadis::getSize(), ILDisassembler::getSize(), IA64Disassembler::getSize(), Alphadis::getSize(), ht_disasm_viewer::handlemsg(), AnalyIA64Disassembler::isBranch(), ht_disasm_sub::next_line_id(), ht_disasm_sub::prev_line_id(), IA64Disassembler::selectNext(), Disassembler::selectNext(), srt_x86(), x86dis::str(), PPCDisassembler::str(), javadis::str(), ILDisassembler::str(), IA64Disassembler::str(), Disassembler::str(), Alphadis::str(), x86dis::strf(), PPCDisassembler::strf(), javadis::strf(), ILDisassembler::strf(), IA64Disassembler::strf(), Alphadis::strf(), x86dis::validInsn(), PPCDisassembler::validInsn(), javadis::validInsn(), ILDisassembler::validInsn(), IA64Disassembler::validInsn(), and Alphadis::validInsn().


Enumeration Type Documentation

enum AsmSyntaxHighlightEnum
 

Enumeration values:
e_cs_default 
e_cs_comment 
e_cs_number 
e_cs_symbol 
e_cs_string 

Definition at line 107 of file asm.h.


Function Documentation

void done_asm  ) 
 

Definition at line 288 of file asm.cc.

References ATOM_DISASM_ALPHA, ATOM_DISASM_IA64, ATOM_DISASM_JAVA, ATOM_DISASM_PPC, ATOM_DISASM_X86, ATOM_DISASM_X86_VXD, and UNREGISTER.

bool init_asm  ) 
 

Definition at line 277 of file asm.cc.

References ATOM_DISASM_ALPHA, ATOM_DISASM_IA64, ATOM_DISASM_JAVA, ATOM_DISASM_PPC, ATOM_DISASM_X86, ATOM_DISASM_X86_VXD, and REGISTER.


Variable Documentation

char*(* addr_sym_func)(CPU_ADDR addr, int *symstrlen, void *context)
 

Definition at line 104 of file asm.h.

Referenced by generate_html_output(), AnalyserOutput::generateAddr(), Analyser::getDisasmStr(), Analyser::getDisasmStrFormatted(), ht_disasm_sub::getline(), x86dis::str_op(), javadis::str_op(), PPCDisassembler::strf(), ILDisassembler::strf(), IA64Disassembler::strf(), and Alphadis::strf().

void* addr_sym_func_context
 

Definition at line 105 of file asm.h.

Referenced by AnalyserOutput::generateAddr(), Analyser::getDisasmStrFormatted(), ht_disasm_sub::getline(), javadis::str_op(), x86dis::str_op(), Alphadis::strf(), IA64Disassembler::strf(), ILDisassembler::strf(), and PPCDisassembler::strf().


Generated on Fri May 7 21:15:46 2004 by doxygen 1.3.5