• Siddhartha's avatar
    Cleanup Android stack unwinder · f7bc9ae0
    Siddhartha authored
    Refactor Stack unwinder code to use a class instead of various functions
    with lot of arguments. Functional changes for case of current thread
    unwind, which is never used.
    1. Handling of nullptr for the case of TraceStack for current thread
       api. This function called TraceStackWithContext with
       stack_segment_base=0, which is wrong and unwind will fail. So, set a
       maximum limit on stack size for unwind.
    2. If stack was never copied (trace stack for current thread), then do
       not replace registers with 0 offset.
    
    Change-Id: I1ee96e05dcba4c658398b29e1caec96b4d733bb1
    Reviewed-on: https://chromium-review.googlesource.com/c/1404262
    Commit-Queue: ssid <ssid@chromium.org>
    Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#622136}
    f7bc9ae0
stack_unwinder_android.cc 23.5 KB