Class: OdinFlex::MachO::LC_BUILD_VERSION

Inherits:
Command
  • Object
show all
Defined in:
lib/odinflex/mach-o.rb

Constant Summary collapse

VALUE =
0x32
SIZE =

platform

4 + # platform
4 + # minos
4 + # sdk
4

Instance Attribute Summary collapse

Attributes inherited from Command

#cmd, #size

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

#command?, from_offset

Methods included from SectionTypes

#command?, #dysymtab?, #section?, #segment?, #symtab?

Constructor Details

#initialize(cmd, size, platform, minos, sdk, ntools) ⇒ LC_BUILD_VERSION

Returns a new instance of LC_BUILD_VERSION.



223
224
225
226
227
228
229
# File 'lib/odinflex/mach-o.rb', line 223

def initialize cmd, size, platform, minos, sdk, ntools
  super(cmd, size)
  @platform = platform
  @minos    = minos
  @sdk      = sdk
  @ntools   = ntools
end

Instance Attribute Details

#minosObject (readonly)

Returns the value of attribute minos.



221
222
223
# File 'lib/odinflex/mach-o.rb', line 221

def minos
  @minos
end

#ntoolsObject (readonly)

Returns the value of attribute ntools.



221
222
223
# File 'lib/odinflex/mach-o.rb', line 221

def ntools
  @ntools
end

#platformObject (readonly)

Returns the value of attribute platform.



221
222
223
# File 'lib/odinflex/mach-o.rb', line 221

def platform
  @platform
end

#sdkObject (readonly)

Returns the value of attribute sdk.



221
222
223
# File 'lib/odinflex/mach-o.rb', line 221

def sdk
  @sdk
end

Class Method Details

.from_io(cmd, size, offset, io) ⇒ Object

ntools



217
218
219
# File 'lib/odinflex/mach-o.rb', line 217

def self.from_io cmd, size, offset, io
  new(cmd, size, *io.read(SIZE).unpack('L4'))
end