metasm/cpu/mips/main.rb in metasm-1.0.3 vs metasm/cpu/mips/main.rb in metasm-1.0.4
- old
+ new
@@ -24,11 +24,11 @@
def initialize(i)
@i = i
end
Sym = @i_to_s.sort.map { |k, v| v.to_sym }
- def symbolic ; @i == 0 ? 0 : Sym[@i] end
+ def symbolic(di=nil) ; @i == 0 ? 0 : Sym[@i] end
end
class FpReg
class << self
attr_accessor :s_to_i, :i_to_s
@@ -46,14 +46,14 @@
attr_accessor :base, :offset, :sz
def initialize(base, offset, sz=32)
@base, @offset, @sz = base, offset, sz
end
- def symbolic(orig)
+ def symbolic(di=nil)
p = nil
p = Expression[p, :+, @base.symbolic] if base
p = Expression[p, :+, @offset] if offset
- Indirection[p.reduce, @sz/8, orig]
+ Indirection[p.reduce, @sz/8, (di.address if di)]
end
end
def initialize(endianness = :big, family = :latest)
super()