Remove parameters from symbolized stack traces.

The expanded parameters take a lot horizontal space
and almost always push the file:line of the screen,
or text-wrap generating multiple lines per frame.

This CL tries to make the output less cluttered by
removing parameters from the unmangled method names.

It is possible to add the parameters back using
the --verbose command line argument.

Test: Add unit tests, investigate crashes from logcat
Change-Id: I42d1e26dbc2fa9db8b7bd95ce449cb2bd93f93f8
This commit is contained in:
David Srbecky
2021-11-01 21:59:59 +00:00
parent fe9a8b11e7
commit 80547ae39d
3 changed files with 68 additions and 6 deletions

View File

@@ -32,6 +32,7 @@ def main():
group = parser.add_mutually_exclusive_group()
group.add_argument('--symbols-dir', '--syms', '--symdir', help='the symbols directory')
group.add_argument('--symbols-zip', help='the symbols.zip file from a build')
parser.add_argument('-v', '--verbose', action='store_true', help="include function parameters")
parser.add_argument('file',
metavar='FILE',
default='-',
@@ -52,6 +53,7 @@ def main():
with zipfile.ZipFile(args.symbols_zip) as zf:
zf.extractall(tmp.name)
symbol.SYMBOLS_DIR = glob.glob("%s/out/target/product/*/symbols" % tmp.name)[0]
symbol.VERBOSE = args.verbose
if args.file == '-':
print("Reading native crash info from stdin")
f = sys.stdin