Class: OdinFlex::MachO::LC_SYMTAB::NList

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

Overview

strsize

Constant Summary collapse

N_GSYM =

From stab.h

0x20
N_FNAME =

global symbol

0x22
N_FUN =

function name

0x24
N_STSYM =

function

0x26
N_LCSYM =
0x28
N_BNSYM =
0x2e
N_AST =
0x32
N_OPT =
0x3c
N_RSYM =
0x40
N_SLINE =
0x44
N_ENSYM =
0x4e
N_SSYM =
0x60
N_SO =
0x64
N_OSO =
0x66
N_STAB =

From nlist.h

0xe0
N_PEXT =
0x10
N_TYPE =
0x0e
N_EXT =
0x01

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descObject

Returns the value of attribute desc

Returns:

  • (Object)

    the current value of desc



239
240
241
# File 'lib/odinflex/mach-o.rb', line 239

def desc
  @desc
end

#indexObject

Returns the value of attribute index

Returns:

  • (Object)

    the current value of index



239
240
241
# File 'lib/odinflex/mach-o.rb', line 239

def index
  @index
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



239
240
241
# File 'lib/odinflex/mach-o.rb', line 239

def name
  @name
end

#sectObject

Returns the value of attribute sect

Returns:

  • (Object)

    the current value of sect



239
240
241
# File 'lib/odinflex/mach-o.rb', line 239

def sect
  @sect
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



239
240
241
# File 'lib/odinflex/mach-o.rb', line 239

def type
  @type
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



239
240
241
# File 'lib/odinflex/mach-o.rb', line 239

def value
  @value
end

Instance Method Details

#archiveObject



281
282
283
# File 'lib/odinflex/mach-o.rb', line 281

def archive
  name[/^.*(?=[(][^)]*[)]$)/]
end

#archive?Boolean

Returns:

  • (Boolean)


277
278
279
# File 'lib/odinflex/mach-o.rb', line 277

def archive?
  oso? && name =~ /[(][^)]*[)]$/
end

#inspectObject



289
290
291
292
293
294
# File 'lib/odinflex/mach-o.rb', line 289

def inspect
  start = "#<struct #{self.class} "
  members.inject(start) { |buffer, member|
    buffer + " #{member.to_s}=#{self[member].inspect}"
  } + ">"
end

#objectObject



285
286
287
# File 'lib/odinflex/mach-o.rb', line 285

def object
  name[/(?<=[(])[^)]*(?=[)]$)/]
end

#stab?Boolean

Returns:

  • (Boolean)


275
# File 'lib/odinflex/mach-o.rb', line 275

def stab?; (type & N_STAB) != 0; end