Find abi before trying to decode the stack.

The CallStack function prints stacks to the log. Unfortunately, our
stack script defaults to arm, so if the data is actually arm64, we'll
do nothing. Modify the script to parse the input trying to determine
the abi before processing the rest of the lines. At the very least,
we'll be able to correctly choose between arm and arm64.

The only downside, is that, the old method could take dumps from different
abis, but no one I know does this.

Bug: 26569638
Change-Id: I5935b82fe0af1e788b0d3edc535b9f0cbb7d1b28
diff --git a/scripts/stack b/scripts/stack
index 256d7e9..8e65dba 100755
--- a/scripts/stack
+++ b/scripts/stack
@@ -29,7 +29,7 @@
   print
   print "  usage: " + sys.argv[0] + " [options] [FILE]"
   print
-  print "  --arch=arm|x86"
+  print "  --arch=arm|arm64|mips|mips64|x86|x86_64"
   print "       the target architecture"
   print
   print "  FILE should contain a stack trace in it somewhere"