aboutsummaryrefslogtreecommitdiff
path: root/absl/debugging/internal/stacktrace_powerpc-inl.inc
diff options
context:
space:
mode:
authorBenjamin Barenblat <bbaren@google.com>2022-07-12 21:47:19 -0400
committerBenjamin Barenblat <bbaren@google.com>2022-07-12 21:47:19 -0400
commitd055841ab4147dac20d5c46d04ca3a2fb13748b7 (patch)
tree15a01389c86f10a8844ff2a86bddf46640d065e8 /absl/debugging/internal/stacktrace_powerpc-inl.inc
parent2d23a3e16abfcf8f22ba850d67e972cc77e98874 (diff)
parent273292d1cfc0a94a65082ee350509af1d113344d (diff)
downloadabseil-d055841ab4147dac20d5c46d04ca3a2fb13748b7.tar.gz
abseil-d055841ab4147dac20d5c46d04ca3a2fb13748b7.tar.bz2
abseil-d055841ab4147dac20d5c46d04ca3a2fb13748b7.zip
Merge new upstream LTS 20220623.0
Diffstat (limited to 'absl/debugging/internal/stacktrace_powerpc-inl.inc')
-rw-r--r--absl/debugging/internal/stacktrace_powerpc-inl.inc11
1 files changed, 8 insertions, 3 deletions
diff --git a/absl/debugging/internal/stacktrace_powerpc-inl.inc b/absl/debugging/internal/stacktrace_powerpc-inl.inc
index cf8c0516..085cef67 100644
--- a/absl/debugging/internal/stacktrace_powerpc-inl.inc
+++ b/absl/debugging/internal/stacktrace_powerpc-inl.inc
@@ -231,11 +231,16 @@ static int UnwindImpl(void** result, int* sizes, int max_depth, int skip_count,
// Implementation detail: we clamp the max of frames we are willing to
// count, so as not to spend too much time in the loop below.
const int kMaxUnwind = 1000;
- int j = 0;
- for (; next_sp != nullptr && j < kMaxUnwind; j++) {
+ int num_dropped_frames = 0;
+ for (int j = 0; next_sp != nullptr && j < kMaxUnwind; j++) {
+ if (skip_count > 0) {
+ skip_count--;
+ } else {
+ num_dropped_frames++;
+ }
next_sp = NextStackFrame<!IS_STACK_FRAMES, IS_WITH_CONTEXT>(next_sp, ucp);
}
- *min_dropped_frames = j;
+ *min_dropped_frames = num_dropped_frames;
}
return n;
}