when attaching the debugger to the device, make sure to pass the appropriate arch to the debug server and lldb (which could be arm64)

This commit is contained in:
Laurent Sansonetti
2014-10-11 15:52:28 +02:00
parent ed993642e8
commit ead120975c
2 changed files with 27 additions and 3 deletions

View File

@@ -231,6 +231,17 @@ task :device => :archive do
App.fail "Device ID `#{device_id}' not provisioned in profile `#{App.config.provisioning_profile}'"
end
env = "XCODE_DIR=\"#{App.config.xcode_dir}\""
if ENV['debug']
unless remote_arch = ENV['arch']
ary = App.config.archs['iPhoneOS']
remote_arch = ary.last
if ary.size > 1
$stderr.puts "*** Application is built for multiple architectures (#{ary.join(', ')}), the debugger will target #{remote_arch}. Pass the `arch' option in order to specify which one to use (ex. rake device debug=1 arch=arm64)."
end
end
env << " RM_REMOTE_ARCH=\"#{remote_arch}\""
end
deploy = File.join(App.config.bindir, 'ios/deploy')
flags = Rake.application.options.trace ? '-d' : ''
Signal.trap(:INT) { } if ENV['debug']