Class: Symbolized

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

Overview

Symbolized

A symbol of the Crashreport that has been desymbolized with gdb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(s) ⇒ Symbolized

Initialize with an output line from gdb. This will extract the addresses, linenumber and source-file



42
43
44
45
46
47
48
49
# File 'lib/symsym.rb', line 42

def initialize(s)
  s.gsub(/Line (\d*) of "(.*)" starts at address (0x[0-9a-f]*) <(.*)> and ends at (0x[0-9a-f]*)/).to_a
  @line = $1
  @filename = $2
  @startaddress = $3.hex if $3
  @symbol = $4
  @endaddress = $5.hex if $3
end

Instance Attribute Details

#endaddressObject (readonly)

Returns the value of attribute endaddress.



40
41
42
# File 'lib/symsym.rb', line 40

def endaddress
  @endaddress
end

#filenameObject (readonly)

Returns the value of attribute filename.



40
41
42
# File 'lib/symsym.rb', line 40

def filename
  @filename
end

#lineObject (readonly)

Returns the value of attribute line.



40
41
42
# File 'lib/symsym.rb', line 40

def line
  @line
end

#startaddressObject (readonly)

Returns the value of attribute startaddress.



40
41
42
# File 'lib/symsym.rb', line 40

def startaddress
  @startaddress
end

#symbolObject (readonly)

Returns the value of attribute symbol.



40
41
42
# File 'lib/symsym.rb', line 40

def symbol
  @symbol
end