arch/arm64: fixed backtrace skip calc error

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
This commit is contained in:
zhangyuan21 2023-04-11 01:41:23 +08:00 committed by Xiang Xiao
parent 2c599bb9e6
commit f5f0af4f9c
1 changed files with 2 additions and 2 deletions

View File

@ -53,7 +53,7 @@ static int backtrace(uintptr_t *base, uintptr_t *limit,
if (pc)
{
if (*skip-- <= 0)
if ((*skip)-- <= 0)
{
buffer[i++] = pc;
}
@ -66,7 +66,7 @@ static int backtrace(uintptr_t *base, uintptr_t *limit,
break;
}
if (*skip-- <= 0)
if ((*skip)-- <= 0)
{
buffer[i++] = (void *)*(fp + 1);
}