Class: Pliney::MachO::FatArchReader
- Defined in:
- lib/pliney/macho.rb
Constant Summary collapse
- CPU_ARCH_ABI64 =
0x01000000
Instance Attribute Summary collapse
-
#align ⇒ Object
readonly
Returns the value of attribute align.
-
#cpusubtype ⇒ Object
readonly
Returns the value of attribute cpusubtype.
-
#cputype ⇒ Object
readonly
Returns the value of attribute cputype.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Attributes inherited from Reader
Instance Method Summary collapse
Methods inherited from Reader
Constructor Details
This class inherits a constructor from Pliney::MachO::Reader
Instance Attribute Details
#align ⇒ Object (readonly)
Returns the value of attribute align.
189 190 191 |
# File 'lib/pliney/macho.rb', line 189 def align @align end |
#cpusubtype ⇒ Object (readonly)
Returns the value of attribute cpusubtype.
189 190 191 |
# File 'lib/pliney/macho.rb', line 189 def cpusubtype @cpusubtype end |
#cputype ⇒ Object (readonly)
Returns the value of attribute cputype.
189 190 191 |
# File 'lib/pliney/macho.rb', line 189 def cputype @cputype end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
189 190 191 |
# File 'lib/pliney/macho.rb', line 189 def offset @offset end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
189 190 191 |
# File 'lib/pliney/macho.rb', line 189 def size @size end |
Instance Method Details
#macho_reader ⇒ Object
200 201 202 203 204 205 206 |
# File 'lib/pliney/macho.rb', line 200 def macho_reader if (@cputype & CPU_ARCH_ABI64) == 0 return MachHeaderReader else return MachHeader64Reader end end |
#parse ⇒ Object
191 192 193 194 195 196 197 198 |
# File 'lib/pliney/macho.rb', line 191 def parse() super() @cputype = @fh.read_uint32 @cpusubtype = @fh.read_uint32 @offset = @fh.read_uint32 @size = @fh.read_uint32 @align = @fh.read_uint32 end |