Class: Tracetool::IOS::IOSTraceScanner
- Inherits:
-
Object
- Object
- Tracetool::IOS::IOSTraceScanner
- Defined in:
- lib/tracetool/ios/scanner.rb
Overview
launches atos
Instance Method Summary collapse
-
#parse(trace) ⇒ Array
Stack trace line consists of numerous whitespace separated columns.
-
#parser(files) ⇒ Tracetool::BaseTraceParser
Create parser for current trace format.
- #process(trace, context) ⇒ Object
- #run_atos(context, trace) ⇒ Object
Instance Method Details
#parse(trace) ⇒ Array
Stack trace line consists of numerous whitespace separated columns. First three always are:
-
frame #
-
binary name
-
address
45 46 47 48 49 |
# File 'lib/tracetool/ios/scanner.rb', line 45 def parse(trace) trace.split("\n").map do |line| line.split(' ')[1..2] # Fetch binary name and address end end |
#parser(files) ⇒ Tracetool::BaseTraceParser
Create parser for current trace format
66 67 68 |
# File 'lib/tracetool/ios/scanner.rb', line 66 def parser(files) IOSTraceParser.new(files) end |
#process(trace, context) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/tracetool/ios/scanner.rb', line 51 def process(trace, context) trace = parse(trace) desym = run_atos(context, trace.map(&:last)) # Add useful columns to unpacked trace mix(trace, desym.split("\n")).join("\n") end |
#run_atos(context, trace) ⇒ Object
58 59 60 |
# File 'lib/tracetool/ios/scanner.rb', line 58 def run_atos(context, trace) Pipe['atos', *AtosContext.new(context).to_args] << trace end |