Class: Unicorn::Section

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(addr, ffi_ptr, size) ⇒ Section

Returns a new instance of Section.



94
95
96
97
98
99
# File 'lib/unicorn/unicorn.rb', line 94

def initialize(addr, ffi_ptr, size)
  @addr = addr
  @ptr = ffi_ptr
  @size = size
  @end_addr = addr + size
end

Instance Attribute Details

#addrObject (readonly)

Returns the value of attribute addr.



93
94
95
# File 'lib/unicorn/unicorn.rb', line 93

def addr
  @addr
end

#end_addrObject (readonly)

Returns the value of attribute end_addr.



93
94
95
# File 'lib/unicorn/unicorn.rb', line 93

def end_addr
  @end_addr
end

#ptrObject (readonly)

Returns the value of attribute ptr.



93
94
95
# File 'lib/unicorn/unicorn.rb', line 93

def ptr
  @ptr
end

#sizeObject (readonly)

Returns the value of attribute size.



93
94
95
# File 'lib/unicorn/unicorn.rb', line 93

def size
  @size
end