Class: Fisk::UnknownLabel

Inherits:
Struct
  • Object
show all
Defined in:
lib/fisk.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#assemblerObject

Returns the value of attribute assembler

Returns:

  • (Object)

    the current value of assembler



105
106
107
# File 'lib/fisk.rb', line 105

def assembler
  @assembler
end

#insnObject

Returns the value of attribute insn

Returns:

  • (Object)

    the current value of insn



105
106
107
# File 'lib/fisk.rb', line 105

def insn
  @insn
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



105
106
107
# File 'lib/fisk.rb', line 105

def name
  @name
end

Instance Method Details

#unknown_label?Boolean

Returns:

  • (Boolean)


110
# File 'lib/fisk.rb', line 110

def unknown_label?; true; end

#valueObject



112
113
114
115
# File 'lib/fisk.rb', line 112

def value
  label = assembler.label_for(name)
  label.position - (insn.position + insn.bytesize)
end

#works?(type) ⇒ Boolean

Returns:

  • (Boolean)


106
107
108
# File 'lib/fisk.rb', line 106

def works? type
  type == "rel32"
end