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.
- #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
46 47 48 49 50 |
# File 'lib/tracetool/ios/scanner.rb', line 46 def parse(trace) trace.split("\n").map do |line| line.split(' ')[1..2] # Fetch binary name and address end end |
#process(trace, context) ⇒ Object
52 53 54 55 56 57 |
# File 'lib/tracetool/ios/scanner.rb', line 52 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
59 60 61 |
# File 'lib/tracetool/ios/scanner.rb', line 59 def run_atos(context, trace) Pipe['atos', *AtosContext.new(context).to_args] << trace end |