Class: Pliney::MachO::CommonSegmentReader

Inherits:
CommonLCReader show all
Defined in:
lib/pliney/macho.rb

Direct Known Subclasses

LC_SEGMENT_64_Reader, LC_SEGMENT_Reader

Instance Attribute Summary collapse

Attributes inherited from CommonLCReader

#cmd, #cmdsize

Attributes inherited from Reader

#fh, #startpos

Instance Method Summary collapse

Methods inherited from CommonLCReader

#resolve_type

Methods inherited from Reader

#initialize, parse, #rewind

Constructor Details

This class inherits a constructor from Pliney::MachO::Reader

Instance Attribute Details

#fileoffObject (readonly)

Returns the value of attribute fileoff.



359
360
361
# File 'lib/pliney/macho.rb', line 359

def fileoff
  @fileoff
end

#filesizeObject (readonly)

Returns the value of attribute filesize.



359
360
361
# File 'lib/pliney/macho.rb', line 359

def filesize
  @filesize
end

#flagsObject (readonly)

Returns the value of attribute flags.



359
360
361
# File 'lib/pliney/macho.rb', line 359

def flags
  @flags
end

#initprotObject (readonly)

Returns the value of attribute initprot.



359
360
361
# File 'lib/pliney/macho.rb', line 359

def initprot
  @initprot
end

#maxprotObject (readonly)

Returns the value of attribute maxprot.



359
360
361
# File 'lib/pliney/macho.rb', line 359

def maxprot
  @maxprot
end

#nsectsObject (readonly)

Returns the value of attribute nsects.



359
360
361
# File 'lib/pliney/macho.rb', line 359

def nsects
  @nsects
end

#sectionsObject (readonly)

Returns the value of attribute sections.



361
362
363
# File 'lib/pliney/macho.rb', line 361

def sections
  @sections
end

#segnameObject (readonly)

Returns the value of attribute segname.



359
360
361
# File 'lib/pliney/macho.rb', line 359

def segname
  @segname
end

#vmaddrObject (readonly)

Returns the value of attribute vmaddr.



359
360
361
# File 'lib/pliney/macho.rb', line 359

def vmaddr
  @vmaddr
end

#vmsizeObject (readonly)

Returns the value of attribute vmsize.



359
360
361
# File 'lib/pliney/macho.rb', line 359

def vmsize
  @vmsize
end

Instance Method Details

#parseObject



363
364
365
366
# File 'lib/pliney/macho.rb', line 363

def parse()
    super()
    @segname = @fh.strictread(16)
end

#segment_nameObject



368
369
370
# File 'lib/pliney/macho.rb', line 368

def segment_name()
    @segname.unpack("Z16").first
end