Commit f7bc9ae0 authored by Siddhartha's avatar Siddhartha Committed by Commit Bot

Cleanup Android stack unwinder

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}
parent de645ecd
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