diff options
| author | Mitch Phillips <mitchp@google.com> | 2020-03-25 10:50:25 -0700 |
|---|---|---|
| committer | Mitch Phillips <mitchp@google.com> | 2020-03-26 13:39:05 -0700 |
| commit | 28319cf466a008e4fcd30554d09e3952bbb1b14a (patch) | |
| tree | 2023e5b816d0f5c210b317f1ab2c553f2f21b455 /libunwindstack/include | |
| parent | 6dcd7b7970e03f3ca8b4a3d0e10a40264a47e41d (diff) | |
Move PC-only unwind frame generation to libunwindstack.
GWP-ASan uses frame-pointer based unwinding internally on
allocation/deallocation to collect stack traces that are used when
crashes are reported.
This should be generic, so pull it out into libunwindstack so it can be
used by MTE as well.
Bug: 152412331
Test: atest debuggerd_test
Change-Id: I27b32263aac63446f5fe398af108676b70cd3971
Diffstat (limited to 'libunwindstack/include')
| -rw-r--r-- | libunwindstack/include/unwindstack/Unwinder.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libunwindstack/include/unwindstack/Unwinder.h b/libunwindstack/include/unwindstack/Unwinder.h index 67762c0bdc..4d49f236aa 100644 --- a/libunwindstack/include/unwindstack/Unwinder.h +++ b/libunwindstack/include/unwindstack/Unwinder.h @@ -114,6 +114,13 @@ class Unwinder { ErrorCode LastErrorCode() { return last_error_.code; } uint64_t LastErrorAddress() { return last_error_.address; } + // Builds a frame for symbolization using the maps from this unwinder. The + // constructed frame contains just enough information to be used to symbolize + // frames collected by frame-pointer unwinding that's done outside of + // libunwindstack. This is used by tombstoned to symbolize frame pointer-based + // stack traces that are collected by tools such as GWP-ASan and MTE. + FrameData BuildFrameFromPcOnly(uint64_t pc); + protected: Unwinder(size_t max_frames) : max_frames_(max_frames) { frames_.reserve(max_frames); } |
