Class: Squash::Symbolicator::Symbol

Inherits:
Struct
  • Object
show all
Includes:
SerialBox
Defined in:
lib/squash/symbolicator/symbols.rb,
lib/squash/symbolicator/symbols.rb

Overview

An address ranged mapped to a symbol (method or function name), as part of a Symbols aggregation. The file and line where the symbol is declared is also included.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#end_addressObject

Returns the value of attribute end_address

Returns:

  • (Object)

    the current value of end_address



15
16
17
# File 'lib/squash/symbolicator/symbols.rb', line 15

def end_address
  @end_address
end

#fileObject

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



15
16
17
# File 'lib/squash/symbolicator/symbols.rb', line 15

def file
  @file
end

#ios_methodObject

Returns the value of attribute ios_method

Returns:

  • (Object)

    the current value of ios_method



15
16
17
# File 'lib/squash/symbolicator/symbols.rb', line 15

def ios_method
  @ios_method
end

#lineObject

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



15
16
17
# File 'lib/squash/symbolicator/symbols.rb', line 15

def line
  @line
end

#start_addressObject

Returns the value of attribute start_address

Returns:

  • (Object)

    the current value of start_address



15
16
17
# File 'lib/squash/symbolicator/symbols.rb', line 15

def start_address
  @start_address
end

Instance Method Details

#<=>(other) ⇒ Object

Raises:

  • (ArgumentError)


29
30
31
32
33
34
35
36
# File 'lib/squash/symbolicator/symbols.rb', line 29

def <=>(other)
  raise ArgumentError unless other.kind_of?(Squash::Symbolicator::Symbol)
  if start_address == other.start_address
    end_address <=> other.end_address
  else
    start_address <=> other.start_address
  end
end