Class: Tracetool::IOS::AtosContext

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

Overview

Converts context to atos arguments

Constant Summary collapse

DEFAULT_ARCH =

If no arch specified will use ‘arm64`

'arm64'.freeze
REQUIRED_ARGUMENTS =

List of required argument names

%i[load_address xarchive module_name].freeze

Instance Method Summary collapse

Constructor Details

#initialize(ctx) ⇒ AtosContext

Returns a new instance of AtosContext.



11
12
13
14
15
16
# File 'lib/tracetool/ios/atos_context.rb', line 11

def initialize(ctx)
  check_arguments(ctx)
  @load_address = ctx.load_address
  @binary_path = module_binary(ctx.xarchive, ctx.module_name)
  @arch = ctx.arch || 'arm64'
end

Instance Method Details

#to_argsObject



18
19
20
# File 'lib/tracetool/ios/atos_context.rb', line 18

def to_args
  %w[-o -l -arch].zip([@binary_path, @load_address, @arch]).flatten
end