Sha256: 9e180d9ad0c8c76f4863fa39aedbc2667cb45ccca4beee5126c85ea10b051f59

Contents?: true

Size: 664 Bytes

Versions: 2

Compression:

Stored size: 664 Bytes

Contents

#    This file is part of Metasm, the Ruby assembly manipulation suite
#    Copyright (C) 2006-2010 Yoann GUILLOT
#
#    Licence is LGPL, see LICENCE in the top-level directory

require 'metasm/main'

module Metasm
class Python < CPU
	def initialize(prog = nil)
		super()
		@program = prog
		@endianness = (prog.respond_to?(:endianness) ? prog.endianness : :little)
		@size = (prog.respond_to?(:size) ? prog.size : 32)
	end

	class Var
		include Renderable

		attr_accessor :i

		def initialize(i); @i = i end

		def ==(o)
			o.class == self.class and o.i == i
		end

		def symbolic(di=nil); "var_#{@i}".to_sym end

		def render
			["var_#@i"]
		end

	end
end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
metasm-1.0.5 metasm/cpu/python/main.rb
metasm-1.0.4 metasm/cpu/python/main.rb