[compiler-rt] r196809 - Unbreak build by adding an implementation of PopStackFrames function.
Richard Smith
richard-llvm at metafoo.co.uk
Mon Dec 9 11:52:39 PST 2013
Author: rsmith
Date: Mon Dec 9 13:52:39 2013
New Revision: 196809
URL: http://llvm.org/viewvc/llvm-project?rev=196809&view=rev
Log:
Unbreak build by adding an implementation of PopStackFrames function.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc?rev=196809&r1=196808&r2=196809&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.cc Mon Dec 9 13:52:39 2013
@@ -147,6 +147,14 @@ static bool MatchPc(uptr cur_pc, uptr tr
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.
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h?rev=196809&r1=196808&r2=196809&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_stacktrace.h Mon Dec 9 13:52:39 2013
@@ -68,6 +68,7 @@ struct StackTrace {
void FastUnwindStack(uptr pc, uptr bp, uptr stack_top, uptr stack_bottom,
uptr max_depth);
void SlowUnwindStack(uptr pc, uptr max_depth);
+ void PopStackFrames(uptr count);
uptr LocatePcInTrace(uptr pc);
};
More information about the llvm-commits
mailing list