• David 'Digit' Turner's avatar
    android: Add pylib/symbols/symbol_utils.py · a6c94dee
    David 'Digit' Turner authored
    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}
    a6c94dee
symbol_utils.py 27.8 KB