fix(coredump): only clear high bit in PC when set

This commit is contained in:
Erhan Kurubas 2025-01-17 17:20:45 +01:00 committed by zhanghaipeng
parent 9a0e0978f2
commit eaefd0bd25

View File

@ -241,7 +241,7 @@ static esp_err_t esp_core_dump_get_regs_from_stack(void* stack_addr,
for (int i = 0; i < XT_SOL_AR_NUM; i++) {
regs->ar[i] = stack_arr[XT_SOL_AR_START + i];
}
regs->pc = (regs->pc & 0x3fffffff);
if (regs->pc & 0x80000000) {
regs->pc = (regs->pc & 0x3fffffff);
}