forked from OSchip/llvm-project
Unbreak build by adding an implementation of PopStackFrames function.
llvm-svn: 196809
This commit is contained in:
parent
90359963ab
commit
ab788cdc81
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue