Unbreak build by adding an implementation of PopStackFrames function.

llvm-svn: 196809
This commit is contained in:
Richard Smith 2013-12-09 19:52:39 +00:00
parent 90359963ab
commit ab788cdc81
2 changed files with 9 additions and 0 deletions

View File

@ -147,6 +147,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.

View File

@ -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);
};