Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Improve backtrace #49

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Improve backtrace #49

merged 1 commit into from
Jan 31, 2024

Conversation

bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented Jan 31, 2024

Before we reported the return-address which often resulted in getting the wrong source location in espflash which made the backtrace look weird and wrong. On Xtensa it wasn't that bad but on RISCV it was often wrong

Now we try to report the address of the call instead which makes the backtrace much better

(Sidenote: originally, I had the fixing of the address in the architecture specific code which worked fine but for Xtensa subtracting 3 from the address when storing it in the result triggered some mis-compilation apparently and in release mode it never generated a backtrace)

@bjoernQ bjoernQ requested a review from MabezDev January 31, 2024 12:15
Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had the fixing of the address in the architecture specific code which worked fine but for Xtensa subtracting 3 from the address when storing it in the result triggered some mis-compilation apparently and in release mode it never generated a backtrace

I definitely ran into this before! Thanks for fixing!

LGTM

@bjoernQ bjoernQ merged commit cd74226 into main Jan 31, 2024
14 checks passed
@bjoernQ bjoernQ deleted the improve-backtrace branch January 31, 2024 12:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants