diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-12-11 06:14:02 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-12-11 06:14:02 +0000 |
commit | 2bbe0d1429a46cb93aafc055de6a8f1b5433e454 (patch) | |
tree | 85a5ee4b0a1a89b500418ebfcde4814ad62537ba | |
parent | e1a6a9aa854641f118369f478ad2b1d30c456ec8 (diff) | |
download | compiler-rt-2bbe0d1429a46cb93aafc055de6a8f1b5433e454.tar.gz |
Merging r196809:
------------------------------------------------------------------------
r196809 | rsmith | 2013-12-09 11:52:39 -0800 (Mon, 09 Dec 2013) | 2 lines
Unbreak build by adding an implementation of PopStackFrames function.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_34@197010 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/sanitizer_common/sanitizer_stacktrace.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_stacktrace.cc b/lib/sanitizer_common/sanitizer_stacktrace.cc index 70ce26bde..de16becca 100644 --- a/lib/sanitizer_common/sanitizer_stacktrace.cc +++ b/lib/sanitizer_common/sanitizer_stacktrace.cc @@ -158,6 +158,14 @@ static bool MatchPc(uptr cur_pc, uptr trace_pc, uptr threshold) { return cur_pc - trace_pc <= threshold || trace_pc - cur_pc <= threshold; } +void StackTrace::PopStackFrames(uptr count) { + CHECK(count < size); + size -= count; + for (uptr i = 0; i < size; ++i) { + trace[i] = trace[i + count]; + } +} + uptr StackTrace::LocatePcInTrace(uptr pc) { // Use threshold to find PC in stack trace, as PC we want to unwind from may // slightly differ from return address in the actual unwinded stack trace. |