duran 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +20 -0
 - data/README.rdoc +11 -0
 - data/Rakefile +29 -0
 - data/VERSION +1 -0
 - data/client_src/dr_include/dr_api.h +102 -0
 - data/client_src/dr_include/dr_app.h +92 -0
 - data/client_src/dr_include/dr_config.h +650 -0
 - data/client_src/dr_include/dr_defines.h +391 -0
 - data/client_src/dr_include/dr_events.h +1057 -0
 - data/client_src/dr_include/dr_ir_instr.h +1214 -0
 - data/client_src/dr_include/dr_ir_instrlist.h +149 -0
 - data/client_src/dr_include/dr_ir_macros.h +2426 -0
 - data/client_src/dr_include/dr_ir_opcodes.h +768 -0
 - data/client_src/dr_include/dr_ir_opnd.h +1170 -0
 - data/client_src/dr_include/dr_ir_utils.h +708 -0
 - data/client_src/dr_include/dr_proc.h +327 -0
 - data/client_src/dr_include/dr_tools.h +1304 -0
 - data/client_src/duran.c +57 -0
 - data/client_src/extconf.rb +28 -0
 - data/lib/duran.rb +18 -0
 - data/lib/duran/app.rb +8 -0
 - data/lib/duran/defines.rb +39 -0
 - data/lib/duran/events.rb +156 -0
 - data/lib/duran/ir_opcodes.rb +616 -0
 - data/lib/duran/ir_opnd.rb +329 -0
 - data/lib/duran/ir_utils.rb +133 -0
 - data/lib/duran/proc.rb +49 -0
 - data/lib/duran/structs.rb +20 -0
 - data/lib/duran/structs/exception.rb +23 -0
 - data/lib/duran/structs/fault_fragment_info.rb +34 -0
 - data/lib/duran/structs/instruction.rb +15 -0
 - data/lib/duran/structs/machine_context.rb +80 -0
 - data/lib/duran/structs/memory_info.rb +12 -0
 - data/lib/duran/structs/module_data.rb +61 -0
 - data/lib/duran/structs/module_names.rb +24 -0
 - data/lib/duran/structs/operand.rb +15 -0
 - data/lib/duran/structs/restore_state_info.rb +30 -0
 - data/lib/duran/structs/signal_info.rb +41 -0
 - data/lib/duran/structs/tracedump.rb +50 -0
 - data/lib/duran/tools.rb +214 -0
 - metadata +104 -0
 
| 
         @@ -0,0 +1,329 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
             
     | 
| 
      
 2 
     | 
    
         
            +
            module Duran
         
     | 
| 
      
 3 
     | 
    
         
            +
              enum :operand_regs, [
         
     | 
| 
      
 4 
     | 
    
         
            +
                :NULL, # /**< Sentinel value indicating no register, for address modes. */
         
     | 
| 
      
 5 
     | 
    
         
            +
                # /* 64-bit general purpose */
         
     | 
| 
      
 6 
     | 
    
         
            +
                :RAX, # /**< The "rax" register. */
         
     | 
| 
      
 7 
     | 
    
         
            +
                :RCX, # /**< The "rcx" register. */
         
     | 
| 
      
 8 
     | 
    
         
            +
                :RDX, # /**< The "rdx" register. */
         
     | 
| 
      
 9 
     | 
    
         
            +
                :RBX, # /**< The "rbx" register. */
         
     | 
| 
      
 10 
     | 
    
         
            +
                :RSP, # /**< The "rsp" register. */
         
     | 
| 
      
 11 
     | 
    
         
            +
                :RBP, # /**< The "rbp" register. */
         
     | 
| 
      
 12 
     | 
    
         
            +
                :RSI, # /**< The "rsi" register. */
         
     | 
| 
      
 13 
     | 
    
         
            +
                :RDI, # /**< The "rdi" register. */
         
     | 
| 
      
 14 
     | 
    
         
            +
                
         
     | 
| 
      
 15 
     | 
    
         
            +
                :R8, # /**< The "r8" register. */
         
     | 
| 
      
 16 
     | 
    
         
            +
                :R9, # /**< The "r9" register. */
         
     | 
| 
      
 17 
     | 
    
         
            +
                :R10, # /**< The "r10" register. */
         
     | 
| 
      
 18 
     | 
    
         
            +
                :R11, # /**< The "r11" register. */
         
     | 
| 
      
 19 
     | 
    
         
            +
                :R12, # /**< The "r12" register. */
         
     | 
| 
      
 20 
     | 
    
         
            +
                :R13, # /**< The "r13" register. */
         
     | 
| 
      
 21 
     | 
    
         
            +
                :R14, # /**< The "r14" register. */
         
     | 
| 
      
 22 
     | 
    
         
            +
                :R15, # /**< The "r15" register. */
         
     | 
| 
      
 23 
     | 
    
         
            +
                
         
     | 
| 
      
 24 
     | 
    
         
            +
                # /* 32-bit general purpose */
         
     | 
| 
      
 25 
     | 
    
         
            +
                :EAX, # /**< The "eax" register. */
         
     | 
| 
      
 26 
     | 
    
         
            +
                :ECX, # /**< The "ecx" register. */
         
     | 
| 
      
 27 
     | 
    
         
            +
                :EDX, # /**< The "edx" register. */
         
     | 
| 
      
 28 
     | 
    
         
            +
                :EBX, # /**< The "ebx" register. */
         
     | 
| 
      
 29 
     | 
    
         
            +
                :ESP, # /**< The "esp" register. */
         
     | 
| 
      
 30 
     | 
    
         
            +
                :EBP, # /**< The "ebp" register. */
         
     | 
| 
      
 31 
     | 
    
         
            +
                :ESI, # /**< The "esi" register. */
         
     | 
| 
      
 32 
     | 
    
         
            +
                :EDI, # /**< The "edi" register. */
         
     | 
| 
      
 33 
     | 
    
         
            +
                
         
     | 
| 
      
 34 
     | 
    
         
            +
                :R8D, # /**< The "r8d" register. */
         
     | 
| 
      
 35 
     | 
    
         
            +
                :R9D, # /**< The "r9d" register. */
         
     | 
| 
      
 36 
     | 
    
         
            +
                :R10D, # /**< The "r10d" register. */
         
     | 
| 
      
 37 
     | 
    
         
            +
                :R11D, # /**< The "r11d" register. */
         
     | 
| 
      
 38 
     | 
    
         
            +
                :R12D, # /**< The "r12d" register. */
         
     | 
| 
      
 39 
     | 
    
         
            +
                :R13D, # /**< The "r13d" register. */
         
     | 
| 
      
 40 
     | 
    
         
            +
                :R14D, # /**< The "r14d" register. */
         
     | 
| 
      
 41 
     | 
    
         
            +
                :R15D, # /**< The "r15d" register. */
         
     | 
| 
      
 42 
     | 
    
         
            +
                
         
     | 
| 
      
 43 
     | 
    
         
            +
                # /* 16-bit general purpose */
         
     | 
| 
      
 44 
     | 
    
         
            +
                :AX, # /**< The "ax" register. */
         
     | 
| 
      
 45 
     | 
    
         
            +
                :CX, # /**< The "cx" register. */
         
     | 
| 
      
 46 
     | 
    
         
            +
                :DX, # /**< The "dx" register. */
         
     | 
| 
      
 47 
     | 
    
         
            +
                :BX, # /**< The "bx" register. */
         
     | 
| 
      
 48 
     | 
    
         
            +
                :SP, # /**< The "sp" register. */
         
     | 
| 
      
 49 
     | 
    
         
            +
                :BP, # /**< The "bp" register. */
         
     | 
| 
      
 50 
     | 
    
         
            +
                :SI, # /**< The "si" register. */
         
     | 
| 
      
 51 
     | 
    
         
            +
                :DI, # /**< The "di" register. */
         
     | 
| 
      
 52 
     | 
    
         
            +
                
         
     | 
| 
      
 53 
     | 
    
         
            +
                :R8W, # /**< The "r8w" register. */
         
     | 
| 
      
 54 
     | 
    
         
            +
                :R9W, # /**< The "r9w" register. */
         
     | 
| 
      
 55 
     | 
    
         
            +
                :R10W, # /**< The "r10w" register. */
         
     | 
| 
      
 56 
     | 
    
         
            +
                :R11W, # /**< The "r11w" register. */
         
     | 
| 
      
 57 
     | 
    
         
            +
                :R12W, # /**< The "r12w" register. */
         
     | 
| 
      
 58 
     | 
    
         
            +
                :R13W, # /**< The "r13w" register. */
         
     | 
| 
      
 59 
     | 
    
         
            +
                :R14W, # /**< The "r14w" register. */
         
     | 
| 
      
 60 
     | 
    
         
            +
                :R15W, # /**< The "r15w" register. */
         
     | 
| 
      
 61 
     | 
    
         
            +
                
         
     | 
| 
      
 62 
     | 
    
         
            +
                # /* 8-bit general purpose */
         
     | 
| 
      
 63 
     | 
    
         
            +
                :AL, # /**< The "al" register. */
         
     | 
| 
      
 64 
     | 
    
         
            +
                :CL, # /**< The "cl" register. */
         
     | 
| 
      
 65 
     | 
    
         
            +
                :DL, # /**< The "dl" register. */
         
     | 
| 
      
 66 
     | 
    
         
            +
                :BL, # /**< The "bl" register. */
         
     | 
| 
      
 67 
     | 
    
         
            +
                :AH, # /**< The "ah" register. */
         
     | 
| 
      
 68 
     | 
    
         
            +
                :CH, # /**< The "ch" register. */
         
     | 
| 
      
 69 
     | 
    
         
            +
                :DH, # /**< The "dh" register. */
         
     | 
| 
      
 70 
     | 
    
         
            +
                :BH, # /**< The "bh" register. */
         
     | 
| 
      
 71 
     | 
    
         
            +
                
         
     | 
| 
      
 72 
     | 
    
         
            +
                :R8L, # /**< The "r8l" register. */
         
     | 
| 
      
 73 
     | 
    
         
            +
                :R9L, # /**< The "r9l" register. */
         
     | 
| 
      
 74 
     | 
    
         
            +
                :R10L, # /**< The "r10l" register. */
         
     | 
| 
      
 75 
     | 
    
         
            +
                :R11L, # /**< The "r11l" register. */
         
     | 
| 
      
 76 
     | 
    
         
            +
                :R12L, # /**< The "r12l" register. */
         
     | 
| 
      
 77 
     | 
    
         
            +
                :R13L, # /**< The "r13l" register. */
         
     | 
| 
      
 78 
     | 
    
         
            +
                :R14L, # /**< The "r14l" register. */
         
     | 
| 
      
 79 
     | 
    
         
            +
                :R15L, # /**< The "r15l" register. */
         
     | 
| 
      
 80 
     | 
    
         
            +
                
         
     | 
| 
      
 81 
     | 
    
         
            +
                :SPL, # /**< The "spl" register. */
         
     | 
| 
      
 82 
     | 
    
         
            +
                :BPL, # /**< The "bpl" register. */
         
     | 
| 
      
 83 
     | 
    
         
            +
                :SIL, # /**< The "sil" register. */
         
     | 
| 
      
 84 
     | 
    
         
            +
                :DIL, # /**< The "dil" register. */
         
     | 
| 
      
 85 
     | 
    
         
            +
                
         
     | 
| 
      
 86 
     | 
    
         
            +
                # /* 64-BIT MMX */
         
     | 
| 
      
 87 
     | 
    
         
            +
                :MM0, # /**< The "mm0" register. */
         
     | 
| 
      
 88 
     | 
    
         
            +
                :MM1, # /**< The "mm1" register. */
         
     | 
| 
      
 89 
     | 
    
         
            +
                :MM2, # /**< The "mm2" register. */
         
     | 
| 
      
 90 
     | 
    
         
            +
                :MM3, # /**< The "mm3" register. */
         
     | 
| 
      
 91 
     | 
    
         
            +
                :MM4, # /**< The "mm4" register. */
         
     | 
| 
      
 92 
     | 
    
         
            +
                :MM5, # /**< The "mm5" register. */
         
     | 
| 
      
 93 
     | 
    
         
            +
                :MM6, # /**< The "mm6" register. */
         
     | 
| 
      
 94 
     | 
    
         
            +
                :MM7, # /**< The "mm7" register. */
         
     | 
| 
      
 95 
     | 
    
         
            +
                
         
     | 
| 
      
 96 
     | 
    
         
            +
                # /* 128-BIT XMM */
         
     | 
| 
      
 97 
     | 
    
         
            +
                :XMM0, # /**< The "xmm0" register. */
         
     | 
| 
      
 98 
     | 
    
         
            +
                :XMM1, # /**< The "xmm1" register. */
         
     | 
| 
      
 99 
     | 
    
         
            +
                :XMM2, # /**< The "xmm2" register. */
         
     | 
| 
      
 100 
     | 
    
         
            +
                :XMM3, # /**< The "xmm3" register. */
         
     | 
| 
      
 101 
     | 
    
         
            +
                :XMM4, # /**< The "xmm4" register. */
         
     | 
| 
      
 102 
     | 
    
         
            +
                :XMM5, # /**< The "xmm5" register. */
         
     | 
| 
      
 103 
     | 
    
         
            +
                :XMM6, # /**< The "xmm6" register. */
         
     | 
| 
      
 104 
     | 
    
         
            +
                :XMM7, # /**< The "xmm7" register. */
         
     | 
| 
      
 105 
     | 
    
         
            +
                
         
     | 
| 
      
 106 
     | 
    
         
            +
                :XMM8, # /**< The "xmm8" register. */
         
     | 
| 
      
 107 
     | 
    
         
            +
                :XMM9, # /**< The "xmm9" register. */
         
     | 
| 
      
 108 
     | 
    
         
            +
                :XMM10, # /**< The "xmm10" register. */
         
     | 
| 
      
 109 
     | 
    
         
            +
                :XMM11, # /**< The "xmm11" register. */
         
     | 
| 
      
 110 
     | 
    
         
            +
                :XMM12, # /**< The "xmm12" register. */
         
     | 
| 
      
 111 
     | 
    
         
            +
                :XMM13, # /**< The "xmm13" register. */
         
     | 
| 
      
 112 
     | 
    
         
            +
                :XMM14, # /**< The "xmm14" register. */
         
     | 
| 
      
 113 
     | 
    
         
            +
                :XMM15, # /**< The "xmm15" register. */
         
     | 
| 
      
 114 
     | 
    
         
            +
                
         
     | 
| 
      
 115 
     | 
    
         
            +
                # /* floating point registers */
         
     | 
| 
      
 116 
     | 
    
         
            +
                :ST0, # /**< The "st0" register. */
         
     | 
| 
      
 117 
     | 
    
         
            +
                :ST1, # /**< The "st1" register. */
         
     | 
| 
      
 118 
     | 
    
         
            +
                :ST2, # /**< The "st2" register. */
         
     | 
| 
      
 119 
     | 
    
         
            +
                :ST3, # /**< The "st3" register. */
         
     | 
| 
      
 120 
     | 
    
         
            +
                :ST4, # /**< The "st4" register. */
         
     | 
| 
      
 121 
     | 
    
         
            +
                :ST5, # /**< The "st5" register. */
         
     | 
| 
      
 122 
     | 
    
         
            +
                :ST6, # /**< The "st6" register. */
         
     | 
| 
      
 123 
     | 
    
         
            +
                :ST7, # /**< The "st7" register. */
         
     | 
| 
      
 124 
     | 
    
         
            +
                
         
     | 
| 
      
 125 
     | 
    
         
            +
                # /* segments (order from "Sreg" description in Intel manual) */
         
     | 
| 
      
 126 
     | 
    
         
            +
                :SEG_ES, # /**< The "es" register. */
         
     | 
| 
      
 127 
     | 
    
         
            +
                :SEG_CS, # /**< The "cs" register. */
         
     | 
| 
      
 128 
     | 
    
         
            +
                :SEG_SS, # /**< The "ss" register. */
         
     | 
| 
      
 129 
     | 
    
         
            +
                :SEG_DS, # /**< The "ds" register. */
         
     | 
| 
      
 130 
     | 
    
         
            +
                :SEG_FS, # /**< The "fs" register. */
         
     | 
| 
      
 131 
     | 
    
         
            +
                :SEG_GS, # /**< The "gs" register. */
         
     | 
| 
      
 132 
     | 
    
         
            +
                
         
     | 
| 
      
 133 
     | 
    
         
            +
                # /* debug & control registers (privileged access only; 8-15 for future processors) */
         
     | 
| 
      
 134 
     | 
    
         
            +
                :DR0, # /**< The "dr0" register. */
         
     | 
| 
      
 135 
     | 
    
         
            +
                :DR1, # /**< The "dr1" register. */
         
     | 
| 
      
 136 
     | 
    
         
            +
                :DR2, # /**< The "dr2" register. */
         
     | 
| 
      
 137 
     | 
    
         
            +
                :DR3, # /**< The "dr3" register. */
         
     | 
| 
      
 138 
     | 
    
         
            +
                :DR4, # /**< The "dr4" register. */
         
     | 
| 
      
 139 
     | 
    
         
            +
                :DR5, # /**< The "dr5" register. */
         
     | 
| 
      
 140 
     | 
    
         
            +
                :DR6, # /**< The "dr6" register. */
         
     | 
| 
      
 141 
     | 
    
         
            +
                :DR7, # /**< The "dr7" register. */
         
     | 
| 
      
 142 
     | 
    
         
            +
                
         
     | 
| 
      
 143 
     | 
    
         
            +
                :DR8, # /**< The "dr8" register. */
         
     | 
| 
      
 144 
     | 
    
         
            +
                :DR9, # /**< The "dr9" register. */
         
     | 
| 
      
 145 
     | 
    
         
            +
                :DR10, # /**< The "dr10" register. */
         
     | 
| 
      
 146 
     | 
    
         
            +
                :DR11, # /**< The "dr11" register. */
         
     | 
| 
      
 147 
     | 
    
         
            +
                :DR12, # /**< The "dr12" register. */
         
     | 
| 
      
 148 
     | 
    
         
            +
                :DR13, # /**< The "dr13" register. */
         
     | 
| 
      
 149 
     | 
    
         
            +
                :DR14, # /**< The "dr14" register. */
         
     | 
| 
      
 150 
     | 
    
         
            +
                :DR15, # /**< The "dr15" register. */
         
     | 
| 
      
 151 
     | 
    
         
            +
                
         
     | 
| 
      
 152 
     | 
    
         
            +
                # /* cr9-cr15 do not yet exist on current x64 hardware */
         
     | 
| 
      
 153 
     | 
    
         
            +
                :CR0, # /**< The "cr0" register. */
         
     | 
| 
      
 154 
     | 
    
         
            +
                :CR1, # /**< The "cr1" register. */
         
     | 
| 
      
 155 
     | 
    
         
            +
                :CR2, # /**< The "cr2" register. */
         
     | 
| 
      
 156 
     | 
    
         
            +
                :CR3, # /**< The "cr3" register. */
         
     | 
| 
      
 157 
     | 
    
         
            +
                :CR4, # /**< The "cr4" register. */
         
     | 
| 
      
 158 
     | 
    
         
            +
                :CR5, # /**< The "cr5" register. */
         
     | 
| 
      
 159 
     | 
    
         
            +
                :CR6, # /**< The "cr6" register. */
         
     | 
| 
      
 160 
     | 
    
         
            +
                :CR7, # /**< The "cr7" register. */
         
     | 
| 
      
 161 
     | 
    
         
            +
                
         
     | 
| 
      
 162 
     | 
    
         
            +
                :CR8, # /**< The "cr8" register. */
         
     | 
| 
      
 163 
     | 
    
         
            +
                :CR9, # /**< The "cr9" register. */
         
     | 
| 
      
 164 
     | 
    
         
            +
                :CR10, # /**< The "cr10" register. */
         
     | 
| 
      
 165 
     | 
    
         
            +
                :CR11, # /**< The "cr11" register. */
         
     | 
| 
      
 166 
     | 
    
         
            +
                :CR12, # /**< The "cr12" register. */
         
     | 
| 
      
 167 
     | 
    
         
            +
                :CR13, # /**< The "cr13" register. */
         
     | 
| 
      
 168 
     | 
    
         
            +
                :CR14, # /**< The "cr14" register. */
         
     | 
| 
      
 169 
     | 
    
         
            +
                :CR15, # /**< The "cr15" register. */
         
     | 
| 
      
 170 
     | 
    
         
            +
                
         
     | 
| 
      
 171 
     | 
    
         
            +
                :INVALID, # /**< Sentinel value indicating an invalid register. */
         
     | 
| 
      
 172 
     | 
    
         
            +
             
     | 
| 
      
 173 
     | 
    
         
            +
                :OPSZ_NA,
         
     | 
| 
      
 174 
     | 
    
         
            +
                :OPSZ_0,
         
     | 
| 
      
 175 
     | 
    
         
            +
                :OPSZ_1,
         
     | 
| 
      
 176 
     | 
    
         
            +
                :OPSZ_2,
         
     | 
| 
      
 177 
     | 
    
         
            +
                :OPSZ_4,
         
     | 
| 
      
 178 
     | 
    
         
            +
                :OPSZ_6,
         
     | 
| 
      
 179 
     | 
    
         
            +
                :OPSZ_8,
         
     | 
| 
      
 180 
     | 
    
         
            +
                :OPSZ_10,
         
     | 
| 
      
 181 
     | 
    
         
            +
                :OPSZ_16,
         
     | 
| 
      
 182 
     | 
    
         
            +
                :OPSZ_14,
         
     | 
| 
      
 183 
     | 
    
         
            +
                :OPSZ_28,
         
     | 
| 
      
 184 
     | 
    
         
            +
                :OPSZ_94,
         
     | 
| 
      
 185 
     | 
    
         
            +
                :OPSZ_108,
         
     | 
| 
      
 186 
     | 
    
         
            +
                :OPSZ_512,
         
     | 
| 
      
 187 
     | 
    
         
            +
                :OPSZ_2_short1,
         
     | 
| 
      
 188 
     | 
    
         
            +
                :OPSZ_4_short2,
         
     | 
| 
      
 189 
     | 
    
         
            +
                :OPSZ_4_rex8_short2,
         
     | 
| 
      
 190 
     | 
    
         
            +
                :OPSZ_4_rex8,
         
     | 
| 
      
 191 
     | 
    
         
            +
                :OPSZ_6_irex10_short4,
         
     | 
| 
      
 192 
     | 
    
         
            +
                :OPSZ_8_short2,
         
     | 
| 
      
 193 
     | 
    
         
            +
                :OPSZ_8_short4,
         
     | 
| 
      
 194 
     | 
    
         
            +
                :OPSZ_28_short14,
         
     | 
| 
      
 195 
     | 
    
         
            +
                :OPSZ_108_short94,
         
     | 
| 
      
 196 
     | 
    
         
            +
                :OPSZ_4x8,
         
     | 
| 
      
 197 
     | 
    
         
            +
                :OPSZ_6x10,
         
     | 
| 
      
 198 
     | 
    
         
            +
                :OPSZ_4x8_short2,
         
     | 
| 
      
 199 
     | 
    
         
            +
                :OPSZ_4x8_short2xi8,
         
     | 
| 
      
 200 
     | 
    
         
            +
                :OPSZ_4_short2xi4,
         
     | 
| 
      
 201 
     | 
    
         
            +
                :OPSZ_1_reg4,
         
     | 
| 
      
 202 
     | 
    
         
            +
                :OPSZ_2_reg4,
         
     | 
| 
      
 203 
     | 
    
         
            +
                :OPSZ_4_reg16,
         
     | 
| 
      
 204 
     | 
    
         
            +
              ]
         
     | 
| 
      
 205 
     | 
    
         
            +
             
     | 
| 
      
 206 
     | 
    
         
            +
              attach_function :opnd_create_null, [], Operand
         
     | 
| 
      
 207 
     | 
    
         
            +
              attach_function :opnd_create_reg, [:reg_id_t], Operand
         
     | 
| 
      
 208 
     | 
    
         
            +
              attach_function :opnd_create_immed_int, [:ptr_int_t, :opnd_size_t], Operand
         
     | 
| 
      
 209 
     | 
    
         
            +
              attach_function :opnd_create_immed_float, [:float], Operand
         
     | 
| 
      
 210 
     | 
    
         
            +
              attach_function :opnd_create_pc, [:app_pc], Operand
         
     | 
| 
      
 211 
     | 
    
         
            +
              attach_function :opnd_create_far_pc, [:ushort, :app_pc], Operand
         
     | 
| 
      
 212 
     | 
    
         
            +
              attach_function :opnd_create_instr, [Instruction], Operand
         
     | 
| 
      
 213 
     | 
    
         
            +
              attach_function :opnd_create_far_instr, [:ushort, Instruction], Operand
         
     | 
| 
      
 214 
     | 
    
         
            +
             
     | 
| 
      
 215 
     | 
    
         
            +
              attach_function :opnd_create_base_disp, 
         
     | 
| 
      
 216 
     | 
    
         
            +
                [:reg_id_t, :reg_id_t, :int, :int, :opnd_size_t], Operand
         
     | 
| 
      
 217 
     | 
    
         
            +
             
     | 
| 
      
 218 
     | 
    
         
            +
              attach_function :opnd_create_base_disp_ex,
         
     | 
| 
      
 219 
     | 
    
         
            +
                [:reg_id_t, :reg_id_t, :int, :int, :opnd_size_t, :bool, :bool, :bool], 
         
     | 
| 
      
 220 
     | 
    
         
            +
                Operand
         
     | 
| 
      
 221 
     | 
    
         
            +
             
     | 
| 
      
 222 
     | 
    
         
            +
              attach_function :opnd_create_far_base_disp, 
         
     | 
| 
      
 223 
     | 
    
         
            +
                [:reg_id_t, :reg_id_t, :reg_id_t, :int, :int, :opnd_size_t], Operand
         
     | 
| 
      
 224 
     | 
    
         
            +
             
     | 
| 
      
 225 
     | 
    
         
            +
              attach_function :opnd_create_far_base_disp_ex,
         
     | 
| 
      
 226 
     | 
    
         
            +
                [:reg_id_t, :reg_id_t, :reg_id_t, :int, :int, :opnd_size_t, 
         
     | 
| 
      
 227 
     | 
    
         
            +
                  :bool, :bool, :bool], Operand
         
     | 
| 
      
 228 
     | 
    
         
            +
             
     | 
| 
      
 229 
     | 
    
         
            +
              attach_function :opnd_create_abs_addr, [:pointer, :opnd_size_t], Operand
         
     | 
| 
      
 230 
     | 
    
         
            +
             
     | 
| 
      
 231 
     | 
    
         
            +
              attach_function :opnd_create_far_abs_addr, 
         
     | 
| 
      
 232 
     | 
    
         
            +
                [:reg_id_t, :pointer, :opnd_size_t], Operand
         
     | 
| 
      
 233 
     | 
    
         
            +
             
     | 
| 
      
 234 
     | 
    
         
            +
              attach_function :opnd_is_null, [Operand], :bool
         
     | 
| 
      
 235 
     | 
    
         
            +
              attach_function :opnd_is_reg, [Operand], :bool
         
     | 
| 
      
 236 
     | 
    
         
            +
              attach_function :opnd_is_immed, [Operand], :bool
         
     | 
| 
      
 237 
     | 
    
         
            +
              attach_function :opnd_is_immed_int, [Operand], :bool
         
     | 
| 
      
 238 
     | 
    
         
            +
              attach_function :opnd_is_immed_float, [Operand], :bool
         
     | 
| 
      
 239 
     | 
    
         
            +
              attach_function :opnd_is_pc, [Operand], :bool
         
     | 
| 
      
 240 
     | 
    
         
            +
              attach_function :opnd_is_near_pc, [Operand], :bool
         
     | 
| 
      
 241 
     | 
    
         
            +
              attach_function :opnd_is_far_pc, [Operand], :bool
         
     | 
| 
      
 242 
     | 
    
         
            +
              attach_function :opnd_is_instr, [Operand], :bool
         
     | 
| 
      
 243 
     | 
    
         
            +
              attach_function :opnd_is_near_instr, [Operand], :bool
         
     | 
| 
      
 244 
     | 
    
         
            +
              attach_function :opnd_is_far_instr, [Operand], :bool
         
     | 
| 
      
 245 
     | 
    
         
            +
              attach_function :opnd_is_base_disp, [Operand], :bool
         
     | 
| 
      
 246 
     | 
    
         
            +
              attach_function :opnd_is_near_base_disp, [Operand], :bool
         
     | 
| 
      
 247 
     | 
    
         
            +
              attach_function :opnd_is_far_base_disp, [Operand], :bool
         
     | 
| 
      
 248 
     | 
    
         
            +
              attach_function :opnd_is_abs_addr, [Operand], :bool
         
     | 
| 
      
 249 
     | 
    
         
            +
              attach_function :opnd_is_near_abs_addr, [Operand], :bool
         
     | 
| 
      
 250 
     | 
    
         
            +
              attach_function :opnd_is_far_abs_addr, [Operand], :bool
         
     | 
| 
      
 251 
     | 
    
         
            +
              attach_function :opnd_is_memory_reference, [Operand], :bool
         
     | 
| 
      
 252 
     | 
    
         
            +
              attach_function :opnd_is_far_memory_reference, [Operand], :bool
         
     | 
| 
      
 253 
     | 
    
         
            +
              attach_function :opnd_is_near_memory_reference, [Operand], :bool
         
     | 
| 
      
 254 
     | 
    
         
            +
              attach_function :opnd_is_disp_encode_zero, [Operand], :bool
         
     | 
| 
      
 255 
     | 
    
         
            +
              attach_function :opnd_is_disp_force_full, [Operand], :bool
         
     | 
| 
      
 256 
     | 
    
         
            +
              attach_function :opnd_is_disp_short_addr, [Operand], :bool
         
     | 
| 
      
 257 
     | 
    
         
            +
              attach_function :opnd_is_reg_32bit, [Operand], :bool
         
     | 
| 
      
 258 
     | 
    
         
            +
              attach_function :opnd_is_reg_64bit, [Operand], :bool
         
     | 
| 
      
 259 
     | 
    
         
            +
              attach_function :opnd_is_reg_pointer_sized, [Operand], :bool
         
     | 
| 
      
 260 
     | 
    
         
            +
              attach_function :opnd_uses_reg, [Operand, :reg_id_t], :bool
         
     | 
| 
      
 261 
     | 
    
         
            +
             
     | 
| 
      
 262 
     | 
    
         
            +
              attach_function :opnd_same, [Operand, Operand], :bool
         
     | 
| 
      
 263 
     | 
    
         
            +
              attach_function :opnd_same_address, [Operand, Operand], :bool
         
     | 
| 
      
 264 
     | 
    
         
            +
              attach_function :opnd_share_reg, [Operand, Operand], :bool
         
     | 
| 
      
 265 
     | 
    
         
            +
              attach_function :opnd_defines_use, [Operand, Operand], :bool
         
     | 
| 
      
 266 
     | 
    
         
            +
              attach_function :opnd_get_size, [Operand], :opnd_size_t
         
     | 
| 
      
 267 
     | 
    
         
            +
              attach_function :opnd_get_immed_int, [Operand], :ptr_int_t
         
     | 
| 
      
 268 
     | 
    
         
            +
              attach_function :opnd_get_immed_float, [Operand], :float
         
     | 
| 
      
 269 
     | 
    
         
            +
              attach_function :opnd_get_pc, [Operand], :app_pc
         
     | 
| 
      
 270 
     | 
    
         
            +
              attach_function :opnd_get_segment_selector, [Operand], :ushort
         
     | 
| 
      
 271 
     | 
    
         
            +
              attach_function :opnd_get_instr, [Operand], Instruction
         
     | 
| 
      
 272 
     | 
    
         
            +
              attach_function :opnd_get_base, [Operand], :reg_id_t
         
     | 
| 
      
 273 
     | 
    
         
            +
              attach_function :opnd_get_disp, [Operand], :int
         
     | 
| 
      
 274 
     | 
    
         
            +
              attach_function :opnd_get_index, [Operand], :reg_id_t
         
     | 
| 
      
 275 
     | 
    
         
            +
              attach_function :opnd_get_scale, [Operand], :int
         
     | 
| 
      
 276 
     | 
    
         
            +
              attach_function :opnd_get_segment, [Operand], :reg_id_t
         
     | 
| 
      
 277 
     | 
    
         
            +
              attach_function :opnd_get_addr, [Operand], :pointer
         
     | 
| 
      
 278 
     | 
    
         
            +
              attach_function :opnd_size_in_bytes, [Operand], :uint
         
     | 
| 
      
 279 
     | 
    
         
            +
              attach_function :opnd_shrink_to_16_bits, [Operand], Operand
         
     | 
| 
      
 280 
     | 
    
         
            +
             
     | 
| 
      
 281 
     | 
    
         
            +
              attach_function :opnd_num_regs_used, [Operand], :int
         
     | 
| 
      
 282 
     | 
    
         
            +
              attach_function :opnd_get_reg_used, [Operand, :int], :reg_id_t
         
     | 
| 
      
 283 
     | 
    
         
            +
              attach_function :opnd_set_size, [Operand, :opnd_size_t], :void
         
     | 
| 
      
 284 
     | 
    
         
            +
              attach_function :opnd_set_disp, [Operand, :int], :void
         
     | 
| 
      
 285 
     | 
    
         
            +
              attach_function :opnd_set_disp_ex, [Operand, :int, :bool, :bool, :bool], :void
         
     | 
| 
      
 286 
     | 
    
         
            +
              attach_function :opnd_replace_reg, [Operand, :reg_id_t, :reg_id_t], :bool
         
     | 
| 
      
 287 
     | 
    
         
            +
              attach_function :opnd_compute_address, [Operand, MachineContext], :app_pc
         
     | 
| 
      
 288 
     | 
    
         
            +
              attach_function :opnd_disassemble, [:dr_ctx_t, Operand, :file_t], :void
         
     | 
| 
      
 289 
     | 
    
         
            +
             
     | 
| 
      
 290 
     | 
    
         
            +
              attach_function :get_register_name, [:reg_id_t], :string
         
     | 
| 
      
 291 
     | 
    
         
            +
              attach_function :reg_32_to_16, [:reg_id_t], :reg_id_t
         
     | 
| 
      
 292 
     | 
    
         
            +
              attach_function :reg_32_to_8, [:reg_id_t], :reg_id_t
         
     | 
| 
      
 293 
     | 
    
         
            +
              attach_function :reg_to_pointer_sized, [:reg_id_t], :reg_id_t
         
     | 
| 
      
 294 
     | 
    
         
            +
             
     | 
| 
      
 295 
     | 
    
         
            +
              attach_function :reg_32_to_opsz, [:reg_id_t, :opnd_size_t], :reg_id_t
         
     | 
| 
      
 296 
     | 
    
         
            +
             
     | 
| 
      
 297 
     | 
    
         
            +
              attach_function :reg_parameter_num, [:reg_id_t], :int
         
     | 
| 
      
 298 
     | 
    
         
            +
             
     | 
| 
      
 299 
     | 
    
         
            +
              attach_function :reg_is_gpr, [:reg_id_t], :bool
         
     | 
| 
      
 300 
     | 
    
         
            +
              attach_function :reg_is_segment, [:reg_id_t], :bool
         
     | 
| 
      
 301 
     | 
    
         
            +
              attach_function :reg_is_xmm, [:reg_id_t], :bool
         
     | 
| 
      
 302 
     | 
    
         
            +
              attach_function :reg_is_mmx, [:reg_id_t], :bool
         
     | 
| 
      
 303 
     | 
    
         
            +
              attach_function :reg_is_fp, [:reg_id_t], :bool
         
     | 
| 
      
 304 
     | 
    
         
            +
              attach_function :reg_is_32bit, [:reg_id_t], :bool
         
     | 
| 
      
 305 
     | 
    
         
            +
              attach_function :reg_is_64bit, [:reg_id_t], :bool
         
     | 
| 
      
 306 
     | 
    
         
            +
              attach_function :reg_is_pointer_sized, [:reg_id_t], :bool
         
     | 
| 
      
 307 
     | 
    
         
            +
             
     | 
| 
      
 308 
     | 
    
         
            +
              attach_function :reg_overlap, [:reg_id_t, :reg_id_t], :bool
         
     | 
| 
      
 309 
     | 
    
         
            +
              attach_function :reg_get_bits, [:reg_id_t], :byte
         
     | 
| 
      
 310 
     | 
    
         
            +
              attach_function :reg_get_size, [:reg_id_t], :opnd_size_t
         
     | 
| 
      
 311 
     | 
    
         
            +
              attach_function :reg_get_value, [:reg_id_t, MachineContext], :reg_t
         
     | 
| 
      
 312 
     | 
    
         
            +
              attach_function :reg_set_value, [:reg_id_t, MachineContext, :reg_t], :void
         
     | 
| 
      
 313 
     | 
    
         
            +
             
     | 
| 
      
 314 
     | 
    
         
            +
              # XXX TODO add #ifdef X64 enclosed stuff
         
     | 
| 
      
 315 
     | 
    
         
            +
              if ::Duran::ARCH == :X64
         
     | 
| 
      
 316 
     | 
    
         
            +
                attach_function :opnd_create_rel_addr, [:pointer, :opnd_size_t], Operand
         
     | 
| 
      
 317 
     | 
    
         
            +
                attach_function :opnd_create_far_rel_addr, 
         
     | 
| 
      
 318 
     | 
    
         
            +
                  [:reg_id_t, :pointer, :opnd_size_t], Operand
         
     | 
| 
      
 319 
     | 
    
         
            +
             
     | 
| 
      
 320 
     | 
    
         
            +
                attach_function :opnd_is_rel_addr, [Operand], :bool
         
     | 
| 
      
 321 
     | 
    
         
            +
                attach_function :opnd_is_near_rel_addr, [Operand], :bool
         
     | 
| 
      
 322 
     | 
    
         
            +
                attach_function :opnd_is_far_rel_addr, [Operand], :bool
         
     | 
| 
      
 323 
     | 
    
         
            +
                attach_function :opnd_shrink_to_32_bits, [Operand], Operand
         
     | 
| 
      
 324 
     | 
    
         
            +
             
     | 
| 
      
 325 
     | 
    
         
            +
                attach_function :reg_32_to_64, [:reg_id_t], :reg_id_t
         
     | 
| 
      
 326 
     | 
    
         
            +
                attach_function :reg_64_to_32, [:reg_id_t], :reg_id_t
         
     | 
| 
      
 327 
     | 
    
         
            +
                attach_function :reg_is_extended, [:reg_id_t], :bool
         
     | 
| 
      
 328 
     | 
    
         
            +
              end
         
     | 
| 
      
 329 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -0,0 +1,133 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
             
     | 
| 
      
 2 
     | 
    
         
            +
            module Duran
         
     | 
| 
      
 3 
     | 
    
         
            +
             
     | 
| 
      
 4 
     | 
    
         
            +
              if ARCH == :x86
         
     | 
| 
      
 5 
     | 
    
         
            +
                attach_function :set_x86_mode, [:dr_ctx_t, :bool], :bool
         
     | 
| 
      
 6 
     | 
    
         
            +
                attach_function :get_x86_mode, [:dr_ctx_t], :bool
         
     | 
| 
      
 7 
     | 
    
         
            +
                SPILL_SLOT_MAX = 17
         
     | 
| 
      
 8 
     | 
    
         
            +
              else
         
     | 
| 
      
 9 
     | 
    
         
            +
                SPILL_SLOT_MAX = 9
         
     | 
| 
      
 10 
     | 
    
         
            +
              end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
              attach_function :dr_save_reg, 
         
     | 
| 
      
 13 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :reg_id_t, :spill_slot_t], :void
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
              attach_function :dr_restore_reg, 
         
     | 
| 
      
 16 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :reg_id_t, :spill_slot_t], :void
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
              attach_function :dr_max_opnd_accessible_spill_slot, [], :spill_slot_t
         
     | 
| 
      
 19 
     | 
    
         
            +
             
     | 
| 
      
 20 
     | 
    
         
            +
              attach_function :dr_reg_spill_slot_opnd, 
         
     | 
| 
      
 21 
     | 
    
         
            +
                [:dr_ctx_t, :spill_slot_t], Operand
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
              attach_function :dr_read_saved_reg, 
         
     | 
| 
      
 24 
     | 
    
         
            +
                [:dr_ctx_t, :spill_slot_t], :reg_t
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
              attach_function :dr_write_saved_reg, 
         
     | 
| 
      
 27 
     | 
    
         
            +
                [:dr_ctx_t, :spill_slot_t, :reg_t], :void
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
              attach_function :dr_save_arith_flags, 
         
     | 
| 
      
 30 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :spill_slot_t], :void
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
              attach_function :dr_restore_arith_flags, 
         
     | 
| 
      
 33 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :spill_slot_t], :void
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
              attach_function :dr_insert_read_tls_field,
         
     | 
| 
      
 36 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :reg_t], :void
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
              attach_function :dr_insert_write_tls_field,
         
     | 
| 
      
 39 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :reg_t], :void
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
              attach_function :instrlist_meta_preinsert, 
         
     | 
| 
      
 42 
     | 
    
         
            +
                [:instrlist_t, Instruction, Instruction], :void
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
              attach_function :instrlist_meta_postinsert, 
         
     | 
| 
      
 45 
     | 
    
         
            +
                [:instrlist_t, Instruction, Instruction], :void
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
              attach_function :instrlist_meta_append,
         
     | 
| 
      
 48 
     | 
    
         
            +
                [:instrlist_t, Instruction], :void
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
              attach_function :instrlist_meta_fault_preinsert, 
         
     | 
| 
      
 51 
     | 
    
         
            +
                [:instrlist_t, Instruction, Instruction], :void
         
     | 
| 
      
 52 
     | 
    
         
            +
             
     | 
| 
      
 53 
     | 
    
         
            +
              attach_function :instrlist_meta_fault_postinsert, 
         
     | 
| 
      
 54 
     | 
    
         
            +
                [:instrlist_t, Instruction, Instruction], :void
         
     | 
| 
      
 55 
     | 
    
         
            +
             
     | 
| 
      
 56 
     | 
    
         
            +
              attach_function :instrlist_meta_fault_append,
         
     | 
| 
      
 57 
     | 
    
         
            +
                [:instrlist_t, Instruction], :void
         
     | 
| 
      
 58 
     | 
    
         
            +
             
     | 
| 
      
 59 
     | 
    
         
            +
              attach_function :dr_insert_clean_call,
         
     | 
| 
      
 60 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :pointer, :bool, :uint, :varargs], 
         
     | 
| 
      
 61 
     | 
    
         
            +
                :void
         
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
              attach_function :dr_insert_call,
         
     | 
| 
      
 64 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :pointer, :uint, :varargs], :void
         
     | 
| 
      
 65 
     | 
    
         
            +
             
     | 
| 
      
 66 
     | 
    
         
            +
              attach_function :dr_prepare_for_call, 
         
     | 
| 
      
 67 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction], :uint
         
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
              attach_function :dr_cleanup_after_call,
         
     | 
| 
      
 70 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :uint], :void
         
     | 
| 
      
 71 
     | 
    
         
            +
             
     | 
| 
      
 72 
     | 
    
         
            +
              attach_function :dr_swap_to_clean_stack, 
         
     | 
| 
      
 73 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction], :void
         
     | 
| 
      
 74 
     | 
    
         
            +
             
     | 
| 
      
 75 
     | 
    
         
            +
              attach_function :dr_restore_app_stack,
         
     | 
| 
      
 76 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction], :void
         
     | 
| 
      
 77 
     | 
    
         
            +
             
     | 
| 
      
 78 
     | 
    
         
            +
              attach_function :dr_insert_call_instrumentation,
         
     | 
| 
      
 79 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :pointer], :void
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
              attach_function :dr_insert_mbr_instrumentation,
         
     | 
| 
      
 82 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :pointer, :spill_slot_t], :void
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
              attach_function :dr_insert_cbr_instrumentation,
         
     | 
| 
      
 85 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :pointer], :void
         
     | 
| 
      
 86 
     | 
    
         
            +
             
     | 
| 
      
 87 
     | 
    
         
            +
              attach_function :dr_insert_ubr_instrumentation,
         
     | 
| 
      
 88 
     | 
    
         
            +
                [:dr_ctx_t, :instrlist_t, Instruction, :pointer], :void
         
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
              attach_function :dr_mcontext_xmm_fields_valid, [], :bool
         
     | 
| 
      
 91 
     | 
    
         
            +
             
     | 
| 
      
 92 
     | 
    
         
            +
              attach_function :dr_get_mcontext, 
         
     | 
| 
      
 93 
     | 
    
         
            +
                [:dr_ctx_t, MachineContext, :pointer], :void
         
     | 
| 
      
 94 
     | 
    
         
            +
              attach_function :dr_set_mcontext, 
         
     | 
| 
      
 95 
     | 
    
         
            +
                [:dr_ctx_t, MachineContext, :pointer], :void
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
              attach_function :dr_redirect_execution, [MachineContext, :int], :void
         
     | 
| 
      
 98 
     | 
    
         
            +
             
     | 
| 
      
 99 
     | 
    
         
            +
              attach_function :decode_memory_reference_size, 
         
     | 
| 
      
 100 
     | 
    
         
            +
                [:dr_ctx_t, :app_pc, :pointer], :app_pc
         
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
              attach_function :decode_eflags_usage, 
         
     | 
| 
      
 103 
     | 
    
         
            +
                [:dr_ctx_t, :pointer, :pointer], :pointer
         
     | 
| 
      
 104 
     | 
    
         
            +
             
     | 
| 
      
 105 
     | 
    
         
            +
              attach_function :decode, [:dr_ctx_t, :pointer, Instruction], :pointer
         
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
              attach_function :decode_from_copy, 
         
     | 
| 
      
 108 
     | 
    
         
            +
                [:dr_ctx_t, :pointer, :pointer, Instruction], :pointer
         
     | 
| 
      
 109 
     | 
    
         
            +
             
     | 
| 
      
 110 
     | 
    
         
            +
              attach_function :decode_as_bb,  [:dr_ctx_t, :pointer], :instrlist_t
         
     | 
| 
      
 111 
     | 
    
         
            +
             
     | 
| 
      
 112 
     | 
    
         
            +
              attach_function :decode_trace,  [:dr_ctx_t, :dr_tag_t], :instrlist_t
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
              attach_function :decode_first_opcode_byte, [:int], :byte
         
     | 
| 
      
 115 
     | 
    
         
            +
             
     | 
| 
      
 116 
     | 
    
         
            +
              attach_function :decode_opcode_name, [:int], :string
         
     | 
| 
      
 117 
     | 
    
         
            +
             
     | 
| 
      
 118 
     | 
    
         
            +
              attach_function :decode_sizeof, 
         
     | 
| 
      
 119 
     | 
    
         
            +
                  (ARCH==:x64 ?  [:dr_ctx_t, :pointer, :pointer, :pointer] :
         
     | 
| 
      
 120 
     | 
    
         
            +
                                 [:dr_ctx_t, :pointer, :pointer]), :int
         
     | 
| 
      
 121 
     | 
    
         
            +
             
     | 
| 
      
 122 
     | 
    
         
            +
              attach_function :decode_next_pc, [:dr_ctx_t, :pointer], :pointer
         
     | 
| 
      
 123 
     | 
    
         
            +
             
     | 
| 
      
 124 
     | 
    
         
            +
              attach_function :disassemble, 
         
     | 
| 
      
 125 
     | 
    
         
            +
                [:dr_ctx_t, :pointer, :file_t], :pointer
         
     | 
| 
      
 126 
     | 
    
         
            +
             
     | 
| 
      
 127 
     | 
    
         
            +
              attach_function :disassemble_with_info, 
         
     | 
| 
      
 128 
     | 
    
         
            +
                [:dr_ctx_t, :pointer, :file_t, :bool, :bool], :pointer
         
     | 
| 
      
 129 
     | 
    
         
            +
             
     | 
| 
      
 130 
     | 
    
         
            +
              attach_function :disassemble_from_copy,
         
     | 
| 
      
 131 
     | 
    
         
            +
                [:dr_ctx_t, :pointer, :pointer, :file_t, :bool, :bool], :pointer
         
     | 
| 
      
 132 
     | 
    
         
            +
             
     | 
| 
      
 133 
     | 
    
         
            +
            end
         
     |