Class: Unicorn::Region

Inherits:
Object
  • Object
show all
Defined in:
lib/unicorn/unicorn.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(addr, size, prot = UC_PROT_ALL) ⇒ Region

Returns a new instance of Region.



77
78
79
80
81
82
# File 'lib/unicorn/unicorn.rb', line 77

def initialize(addr, size, prot = UC_PROT_ALL)
  @addr = addr
  @size = size
  @prot = prot
  @end_addr = addr + size
end

Instance Attribute Details

#addrObject (readonly)

Returns the value of attribute addr.



76
77
78
# File 'lib/unicorn/unicorn.rb', line 76

def addr
  @addr
end

#end_addrObject (readonly)

Returns the value of attribute end_addr.



76
77
78
# File 'lib/unicorn/unicorn.rb', line 76

def end_addr
  @end_addr
end

#protObject (readonly)

Returns the value of attribute prot.



76
77
78
# File 'lib/unicorn/unicorn.rb', line 76

def prot
  @prot
end

#sizeObject (readonly)

Returns the value of attribute size.



76
77
78
# File 'lib/unicorn/unicorn.rb', line 76

def size
  @size
end