Revert "Do not fallback to slow_backtrace when tdep_trace stops unwinding"

This reverts commit 5b195ffd50 because it breaks
both arm and armhf test suites.
This commit is contained in:
Mathieu Othacehe
2025-06-03 16:53:10 +02:00
committed by Stephen M. Webb
parent 7718ecc1dd
commit 09885eb855

View File

@@ -67,8 +67,7 @@ unw_backtrace (void **buffer, int size)
if (unlikely (unw_init_local (&cursor, &uc) < 0))
return 0;
int ret = tdep_trace (&cursor, buffer, &n);
if (unlikely (ret < 0 && ret != -UNW_ESTOPUNWIND))
if (unlikely (tdep_trace (&cursor, buffer, &n) < 0))
{
unw_getcontext (&uc);
return slow_backtrace (buffer, size, &uc, 0);
@@ -109,8 +108,7 @@ unw_backtrace2 (void **buffer, int size, unw_context_t* uc2, int flag)
// returns the number of frames collected by tdep_trace or slow_backtrace
// and add 1 to it (the one we retrieved above)
int ret = tdep_trace (&cursor, buffer, &n);
if (unlikely (ret < 0 && ret != -UNW_ESTOPUNWIND))
if (unlikely (tdep_trace (&cursor, buffer, &n) < 0))
{
return slow_backtrace (buffer, remaining_size, &uc, flag) + 1;
}