Class: Pliney::MachO::CommonDylibCommandReader

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

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

#dylib_name_dataObject (readonly)

Returns the value of attribute dylib_name_data.



518
519
520
# File 'lib/pliney/macho.rb', line 518

def dylib_name_data
  @dylib_name_data
end

#dylib_structObject (readonly)

Returns the value of attribute dylib_struct.



518
519
520
# File 'lib/pliney/macho.rb', line 518

def dylib_struct
  @dylib_struct
end

Instance Method Details

#dylib_nameObject



526
527
528
# File 'lib/pliney/macho.rb', line 526

def dylib_name()
    @dylib_name_data.unpack("Z*").first
end

#parseObject



520
521
522
523
524
# File 'lib/pliney/macho.rb', line 520

def parse()
    super()
    @dylib_struct = DylibStructReader.parse(@fh)
    @dylib_name_data = @fh.strictread(self.cmdsize - self.dylib_struct.offset)
end