Class: Tracetool::Android::AndroidTraceScanner

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

Overview

Desymbolicates android traces

Constant Summary collapse

SCANNERS =

List of scanners

[JavaTraceScanner, NativeTraceScanner].freeze

Instance Method Summary collapse

Instance Method Details

#parser(files) ⇒ Tracetool::BaseTraceParser

Creates parser for last unpacked trace

Parameters:

  • files (Array)

    list of source files used in build

Returns:



27
28
29
30
31
# File 'lib/tracetool/android.rb', line 27

def parser(files)
  return unless @scanner

  @scanner.parser(files)
end

#process(trace, context) ⇒ Object

Launches process of trace desymbolication

Parameters:

  • trace (String)

    trace body

Raises:

  • (ArgumentError)


15
16
17
18
19
20
21
# File 'lib/tracetool/android.rb', line 15

def process(trace, context)
  # Find scanner which matches trace format
  @scanner = SCANNERS.map { |s| s[trace] }.compact.first
  raise(ArgumentError, "#{trace}\n not android trace?") unless @scanner

  @scanner.process(context)
end