| Index: third_party/android_platform/development/scripts/stack
|
| diff --git a/tools/android_stack_parser/stack b/third_party/android_platform/development/scripts/stack
|
| similarity index 81%
|
| copy from tools/android_stack_parser/stack
|
| copy to third_party/android_platform/development/scripts/stack
|
| index ded6d54dd0dfda35feb07aa248ae7e6fa12f49e7..e55f688ed4ed4ccde0ed3bfd33b7733aac87d7b2 100755
|
| --- a/tools/android_stack_parser/stack
|
| +++ b/third_party/android_platform/development/scripts/stack
|
| @@ -19,7 +19,6 @@
|
| import getopt
|
| import glob
|
| import os
|
| -import re
|
| import sys
|
|
|
| import stack_core
|
| @@ -36,14 +35,13 @@ def PrintUsage():
|
| print " usage: " + sys.argv[0] + " [options] [FILE]"
|
| print
|
| print " --symbols-dir=path"
|
| - print " the path to a symbols dir, this is generally for system level"
|
| - print " symbols"
|
| + print " the path to a symbols dir, such as =/tmp/out/target/product/dream/symbols"
|
| print
|
| - print " --mojo-symbols-dir=path"
|
| - print " the path to a directory containing Mojo symbols (can be"
|
| - print " absolute or relative to src), such as =out/android_Debug"
|
| - print " If not specified, will look for the newest lib in "
|
| - print " out/android_Debug or out/android_Release"
|
| + print " --chrome-symbols-dir=path"
|
| + print " the path to a Chrome symbols dir (can be absolute or relative"
|
| + print " to src), such as =out/Debug/lib"
|
| + print " If not specified, will look for the newest lib in out/Debug or"
|
| + print " out/Release"
|
| print
|
| print " --symbols-zip=path"
|
| print " the path to a symbols zip file, such as =dream-symbols-12345.zip"
|
| @@ -56,7 +54,7 @@ def PrintUsage():
|
| print " argument information. Also, the 'stack data' section will be"
|
| print " printed."
|
| print
|
| - print " --arch=arm|arm64|x64|x86|mips"
|
| + print " --arch=arm|arm64|x86_64|x86|mips"
|
| print " the target architecture"
|
| print
|
| print " FILE should contain a stack trace in it somewhere"
|
| @@ -110,31 +108,12 @@ def UnzipSymbols(symbolfile, symdir=None):
|
| return (symdir, symdir)
|
|
|
|
|
| -def GetBasenameFromMojoApp(url):
|
| - """Used by GetSymbolMapping() to extract the basename from the location the
|
| - mojo app was downloaded from. The location is a URL, e.g.
|
| - http://foo/bar/x.so."""
|
| - index = url.rfind('/')
|
| - return url[(index + 1):] if index != -1 else url
|
| -
|
| -
|
| -def GetSymbolMapping(lines):
|
| - """Returns a mapping (dictionary) from download file to .so."""
|
| - regex = re.compile('Caching mojo app (\S+) at (\S+)')
|
| - mappings = {}
|
| - for line in lines:
|
| - result = regex.search(line)
|
| - if result:
|
| - mappings[result.group(2)] = GetBasenameFromMojoApp(result.group(1))
|
| - return mappings
|
| -
|
| -
|
| def main():
|
| try:
|
| options, arguments = getopt.getopt(sys.argv[1:], "",
|
| ["more-info",
|
| "less-info",
|
| - "mojo-symbols-dir=",
|
| + "chrome-symbols-dir=",
|
| "symbols-dir=",
|
| "symbols-zip=",
|
| "arch=",
|
| @@ -153,7 +132,7 @@ def main():
|
| zip_arg = os.path.expanduser(value)
|
| elif option == "--arch":
|
| symbol.ARCH = value
|
| - elif option == "--mojo-symbols-dir":
|
| + elif option == "--chrome-symbols-dir":
|
| symbol.CHROME_SYMBOLS_DIR = os.path.join(symbol.CHROME_SYMBOLS_DIR, value)
|
| elif option == "--more-info":
|
| more_info = True
|
| @@ -179,7 +158,7 @@ def main():
|
|
|
| print "Reading Android symbols from", symbol.SYMBOLS_DIR
|
| print "Reading Chrome symbols from", symbol.CHROME_SYMBOLS_DIR
|
| - stack_core.ConvertTrace(lines, more_info, GetSymbolMapping(lines))
|
| + stack_core.ConvertTrace(lines, more_info)
|
|
|
| if rootdir:
|
| # be a good citizen and clean up...os.rmdir and os.removedirs() don't work
|
|
|