@@ -78,7 +78,8 @@ template <bool IS_STACK_FRAMES, bool IS_WITH_CONTEXT>
7878ABSL_ATTRIBUTE_ALWAYS_INLINE inline int Unwind (void ** result, uintptr_t * frames,
7979 int * sizes, size_t max_depth,
8080 int skip_count, const void * uc,
81- int * min_dropped_frames) {
81+ int * min_dropped_frames,
82+ bool unwind_with_fixup = true ) {
8283 static constexpr size_t kMinPageSize = 4096 ;
8384
8485 // Allow up to ~half a page, leaving some slack space for local variables etc.
@@ -100,7 +101,8 @@ ABSL_ATTRIBUTE_ALWAYS_INLINE inline int Unwind(void** result, uintptr_t* frames,
100101 bool must_free_frames = false ;
101102 bool must_free_sizes = false ;
102103
103- bool unwind_with_fixup = internal_stacktrace::ShouldFixUpStack ();
104+ unwind_with_fixup =
105+ unwind_with_fixup && internal_stacktrace::ShouldFixUpStack ();
104106
105107#ifdef _WIN32
106108 if (unwind_with_fixup) {
@@ -194,6 +196,14 @@ internal_stacktrace::GetStackFramesWithContext(void** result, uintptr_t* frames,
194196 min_dropped_frames);
195197}
196198
199+ ABSL_ATTRIBUTE_NOINLINE ABSL_ATTRIBUTE_NO_TAIL_CALL int
200+ internal_stacktrace::GetStackTraceNoFixup (void ** result, int max_depth,
201+ int skip_count) {
202+ return Unwind<false , false >(result, nullptr , nullptr ,
203+ static_cast <size_t >(max_depth), skip_count,
204+ nullptr , nullptr , /* unwind_with_fixup=*/ false );
205+ }
206+
197207ABSL_ATTRIBUTE_NOINLINE ABSL_ATTRIBUTE_NO_TAIL_CALL int GetStackTrace (
198208 void ** result, int max_depth, int skip_count) {
199209 return Unwind<false , false >(result, nullptr , nullptr ,
0 commit comments