Stackdb
Stackdb is a stackable, multi-target and -level source debugger and memory forensics library.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Enumerations | Variables
disasm.h File Reference
#include <mnemonics.h>
#include <distorm.h>
#include "common.h"
Include dependency graph for disasm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  inst_data
 
struct  cf_inst_data
 
struct  disasm_data
 

Macros

#define INST_NAME(inst_type)   GET_MNEMONIC_NAME((inst_type))
 
#define REG_NAME(reg_type)   GET_REGISTER_NAME((reg_type))
 
#define INST_TYPE_NAME(inst_type)
 
#define INST_TO_CF_FLAG(inst)   (1 << (inst))
 
#define LOGDUMPDISASMCFIDATA(dl, lt, idata)
 

Typedefs

typedef _InstructionType dis_inst_t
 
typedef _RegisterType dis_reg_t
 

Enumerations

enum  decode_t { DECODE_TYPE_NONE = 0, DECODE_TYPE_CONTROL = 1 }
 
enum  inst_type_t {
  INST_NONE = 0, INST_RET, INST_IRET, INST_CALL,
  INST_SYSCALL, INST_SYSRET, INST_SYSENTER, INST_SYSEXIT,
  INST_INT, INST_INT3, INST_INTO, INST_JMP,
  INST_JCC, INST_CMOV
}
 
enum  inst_cf_flags_t {
  INST_CF_ANY = 0, INST_CF_RET = 1 << INST_RET, INST_CF_IRET = 1 << INST_IRET, INST_CF_CALL = 1 << INST_CALL,
  INST_CF_SYSCALL = 1 << INST_SYSCALL, INST_CF_SYSRET = 1 << INST_SYSRET, INST_CF_SYSENTER = 1 << INST_SYSENTER, INST_CF_SYSEXIT = 1 << INST_SYSEXIT,
  INST_CF_INT = 1 << INST_INT, INST_CF_INT3 = 1 << INST_INT3, INST_CF_INTO = 1 << INST_INTO, INST_CF_JMP = 1 << INST_JMP,
  INST_CF_JCC = 1 << INST_JCC, INST_CF_CMOV = 1 << INST_CMOV
}
 

Variables

char *const inst_type_names []
 

Macro Definition Documentation

#define INST_NAME (   inst_type)    GET_MNEMONIC_NAME((inst_type))

Definition at line 41 of file disasm.h.

#define INST_TO_CF_FLAG (   inst)    (1 << (inst))

Definition at line 84 of file disasm.h.

#define INST_TYPE_NAME (   inst_type)
Value:
(((inst_type) < (sizeof(inst_type_names) \
/ sizeof(inst_type_names[0]))) \
? inst_type_names[(inst_type)] : "UNKNOWN")
char *const inst_type_names[]
Definition: disasm.c:641

Definition at line 63 of file disasm.h.

#define LOGDUMPDISASMCFIDATA (   dl,
  lt,
  idata 
)
Value:
vdebugc((dl),(lt), \
"cf_inst_data(%s:+%"PRIdOFFSET":%s%s%s%s:disp=%"PRIu64"," \
"target=0x%"PRIxADDR")\n", \
INST_TYPE_NAME((idata)->type),(idata)->offset, \
((idata)->cf.is_relative) ? "relative," : "", \
((idata)->cf.is_mem) ? "mem," : "", \
((idata)->cf.is_reg) ? "reg," : "", \
((idata)->cf.target_in_segment) ? "target_in_segment," : "", \
((idata)->cf.target_is_valid) ? "target_is_valid," : "", \
(idata)->cf.disp,(idata)->target);
#define INST_TYPE_NAME(inst_type)
Definition: disasm.h:63
#define vdebugc(devel, areas, flags, format,...)
Definition: log.h:303
#define PRIxADDR
Definition: common.h:67

Definition at line 86 of file disasm.h.

#define REG_NAME (   reg_type)    GET_REGISTER_NAME((reg_type))

Definition at line 42 of file disasm.h.

Typedef Documentation

typedef _InstructionType dis_inst_t

Definition at line 26 of file disasm.h.

typedef _RegisterType dis_reg_t

Definition at line 27 of file disasm.h.

Enumeration Type Documentation

enum decode_t
Enumerator
DECODE_TYPE_NONE 
DECODE_TYPE_CONTROL 

Definition at line 29 of file disasm.h.

Enumerator
INST_CF_ANY 
INST_CF_RET 
INST_CF_IRET 
INST_CF_CALL 
INST_CF_SYSCALL 
INST_CF_SYSRET 
INST_CF_SYSENTER 
INST_CF_SYSEXIT 
INST_CF_INT 
INST_CF_INT3 
INST_CF_INTO 
INST_CF_JMP 
INST_CF_JCC 
INST_CF_CMOV 

Definition at line 67 of file disasm.h.

Enumerator
INST_NONE 
INST_RET 
INST_IRET 
INST_CALL 
INST_SYSCALL 
INST_SYSRET 
INST_SYSENTER 
INST_SYSEXIT 
INST_INT 
INST_INT3 
INST_INTO 
INST_JMP 
INST_JCC 
INST_CMOV 

Definition at line 46 of file disasm.h.

Variable Documentation

char* const inst_type_names[]

Definition at line 641 of file disasm.c.