metasm/cpu/arm64/decode.rb in metasm-1.0.3 vs metasm/cpu/arm64/decode.rb in metasm-1.0.4

- old
+ new

@@ -163,14 +163,10 @@ di.instruction.args[-1] = Expression[Expression[[addr, :&, ~0xfff], :+, [di.instruction.args[-1], :<<, 12]].reduce] end di end - def backtrace_binding - @backtrace_binding ||= init_backtrace_binding - end - def init_backtrace_binding @backtrace_binding ||= {} opcode_list.map { |ol| ol.basename }.uniq.sort.each { |op| binding = case op @@ -209,11 +205,11 @@ def get_backtrace_binding(di) a = di.instruction.args.map { |arg| case arg when Reg, RegShift, RegCC; arg.symbolic - when Memref; arg.symbolic(di.address) + when Memref; arg.symbolic(di) else arg end } if binding = backtrace_binding[di.opcode.name] @@ -267,10 +263,10 @@ case tg when nil raise 'internal error: no jmp target' if di.opcode.name != 'ret' tg = :x30 when Expression - else tg = tg.symbolic + else tg = tg.symbolic(di) end [tg] else # TODO ldr pc, .. []