Commit a6c94dee authored by David 'Digit' Turner's avatar David 'Digit' Turner Committed by Commit Bot

android: Add pylib/symbols/symbol_utils.py

This CL introduces a new Python script providing various
functions to deal with symbolization of crash back traces,
stack traces, and memory map sections, as they appear in
logcat and tombstone files on Android.

They also rely on the classes introduced by the previous CL at [1]

- HostLibraryFind() is used to locate unstripped version of
  native libraries on the host, based on their device path
  as it appears in tombstones / logcat.

- SymbolResolver, and its derived classes, are used to turn
  a library (path, offset) into a symbol info string.

- MemoryMap is used to model the memory map as it appears
  in a tombstone file, which can be used to symbolize
  random addresses that appear in the stack.

- BackTraceTranslator is used to parse and symbolize
  back traces as they appear in logcat and tombstones.

- StackTranslator is used to parse and symbolize
  stacks as they appear in tombstones.

BUG=755225
R=agrieve@chromium.org, jbudorick@chromium.org, pasko@chromium.org, lizeb@chromium.org

[1] https://chromium-review.googlesource.com/c/chromium/src/+/1047211

Change-Id: Ie6d5e8ad395c8953fc6c88948a761ecd2fda8092
Reviewed-on: https://chromium-review.googlesource.com/1138323
Commit-Queue: David Turner <digit@chromium.org>
Reviewed-by: default avataragrieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577575}
parent ae150327
...@@ -74,6 +74,7 @@ def CommonChecks(input_api, output_api): ...@@ -74,6 +74,7 @@ def CommonChecks(input_api, output_api):
J('pylib', 'results', 'json_results_test.py'), J('pylib', 'results', 'json_results_test.py'),
J('pylib', 'symbols', 'apk_native_libs_unittest.py'), J('pylib', 'symbols', 'apk_native_libs_unittest.py'),
J('pylib', 'symbols', 'elf_symbolizer_unittest.py'), J('pylib', 'symbols', 'elf_symbolizer_unittest.py'),
J('pylib', 'symbols', 'symbol_utils_unittest.py'),
J('pylib', 'utils', 'decorators_test.py'), J('pylib', 'utils', 'decorators_test.py'),
J('pylib', 'utils', 'device_dependencies_test.py'), J('pylib', 'utils', 'device_dependencies_test.py'),
J('pylib', 'utils', 'dexdump_test.py'), J('pylib', 'utils', 'dexdump_test.py'),
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment