Class: AirbrakeSymbolicate::Symbolicator

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

Class Method Summary collapse

Class Method Details

.symbolicate_line(dsym_file, line) ⇒ Object



53
54
55
56
57
58
59
60
# File 'lib/airbrake_symbolicate.rb', line 53

def symbolicate_line(dsym_file, line)
  binname = File.basename(dsym_file)
  if line[/#{binname}/] && loc = line[/0x\w+/]
    `/usr/bin/atos -arch armv7 -o "#{dsym_file}" #{loc}`.sub(/^[-_]+/, '')
  else
    line
  end.chomp
end

.symbolicated_backtrace(error) ⇒ Object



47
48
49
50
51
# File 'lib/airbrake_symbolicate.rb', line 47

def symbolicated_backtrace(error)
  if dsym = DsymFinder.dsym_for_error(error)
    error.backtrace.line.map {|l| Symbolicator.symbolicate_line(dsym, l)}
  end
end