Skip to content

Instantly share code, notes, and snippets.

@mackuba
Created July 13, 2012 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mackuba/3105101 to your computer and use it in GitHub Desktop.
Save mackuba/3105101 to your computer and use it in GitHub Desktop.
A script to symbolicate iOS crash logs
#!/usr/bin/env ruby
app = ARGV[0]
executable = app + "/" + app[/[\w\-]+\.app/].split('.').first
lines = STDIN.read
lines.each do |l|
if l =~ /PCRM/
address = l[/0x\w\w+/]
decoded = `atos -arch armv7 -o #{executable} #{address}`.strip
print l.gsub(/\+ .*$/, decoded)
else
print l
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment