Commit Graph

12 Commits

Author SHA1 Message Date
Christopher Ferris
a47d6d090f Add missing changes from ARCH removal.
I somehow didn't upload these fixes from the review. So doing that
now.

Test: Unit tests pass.
Change-Id: Ia17e480eb972db4f7be6947c0e6567632c65431f
2023-03-13 15:22:47 -07:00
Christopher Ferris
f62a3be63d Remove all ARCH references.
Replaced with ARCH_IS_32BIT since that's the only thing truly
necessary to work.

This also makes the register regex much more lenient, but it appears
to be strict enough that it doesn't seem to capture arbitrary lines
when run through logcat.

Removed the StripPC function and verified that an arm crash that
ends in 1 still works.

Removed the architecture.py script, it is old and I don't see anyone
using it.

Modify the reading of the lines to ignore any errors in the input.

Test: All unit tests pass.
Test: Symbolized arm and arm64 tombstones
Test: Symbolized x86 and x86_64 tombstones
Test: Ran through a logcat and verified it caught the bug but
Test: didn't print any extra information.
Change-Id: I6a65ecaad68da1d56864db32ff434512e4df0d89
2023-03-09 18:44:59 -08:00
David Srbecky
80547ae39d 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
2021-12-23 14:09:11 +00:00
Elliott Hughes
409282b77f stack: add support for a .zip of symbols.
This is the one remaining feature in vendor/google/tools/stack that
isn't in the "One True" stack script.

Bug: http://b/199390145
Test: manual
Change-Id: I9dd832f6fb5767c3ad3263c1ffc7dfdb0103e535
2021-09-10 13:19:53 -07:00
Krzysztof Kosiński
b136111f17 Upgrade the 'stack' script to python3.
Also hook up the test to Android.bp.

Test: unit test
Test: Ran with a tombstone file as parameter.
Test: Ran pasting in stack to stdin.
Change-Id: I25f40569cc49b7487553611bcc25d061179bfa8d
2021-04-09 13:21:32 -07:00
Andreas Gampe
dcf9800c7e Stack: Fix argument-less invocation
Add nargs='?' to allow a missing positional argument.

Bug: 131662960
Test: manual
Change-Id: I47d98c7d903b0028bd9969580ff0217aaf0cfb78
2019-04-30 10:07:24 -07:00
Andreas Gampe
d8c0293a33 Stack: Add ability to override symbols dir
Add --syms option to set the symbols directory used for lookup.

Test: m
Test: manual
Change-Id: Ibe0c93c68cafe017341e54e8f14ea9d775ae13bd
2019-04-08 12:32:27 -07:00
Andreas Gampe
3c9db52fd7 Stack: Replace getopt with argparse
Modernize and make it easier to add new options.

Test: m
Test: manual
Change-Id: Ib7b1de4626e6b2cd27dca1dd911c594db93cb292
2019-04-08 12:32:01 -07:00
Christopher Ferris
bf8a940234 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
2016-03-15 16:25:19 -07:00
Brigid Smith
ea0a835d4d Turning stack_core into a class to make it compatible with adbs.
This includes the fairly large change of refactoring stack_core.py into
a class so that its behavior is compatible with adbs.  Additionally, if
the ABI line does not come before lines that require it to determine
proper widths (registers, stack), then it will assume that the ABI is
32 bit and not 64.

Change-Id: I6ad84a55337d86d25f7f8197048dc93868b0a01a
2014-07-01 11:25:44 -07:00
Ben Cheng
b42dad0dee Clean up the stack trace symbolization tool.
Change-Id: Id71cacde653a5c1c92a028ee80f5aa8264e1963a
2013-04-25 15:34:14 -07:00
Iliyan Malchev
4929d6a562 development: copy stack tool over from vendor/google/tools
The stack tool is not really proprietary, and is needed by vendors and
third-party developers working on native code.

Change-Id: I37f34b0681a0063ecf71f5a078d2c4a1ba622973
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-08-04 17:44:40 -07:00