Hi!
How do you recommend to debug crashes?
Especially how do you recommend to debug crashes that happen to our customers that we cannot reproduce?
So far I have been trying to:
I know I can use arm-none-eabi-addr2line to get a line of the crash. But that usually leads to some generic assert in zephyr's internals.
- That's not sufficient to know how zephyr got there (i.e., what I have called before the crash happened).
- There is usually no comment that would explain why the assert is in place and what may have caused it to fail.
I have been trying to get zephyr to print a stack trace. Unsuccessfuly. According to other devzone threads there is no way to do that.
As to attaching a debuger: my attempts so far haven't been successful. Vscode behaves as if debugger was attached and the code running, but the device acts as dead. In any case, debugger doesn't help with debugging customer's problems, and even for my local development is very inconvenient, so it hasn't very high priority for me.
So far the least disfunctional approach I have found is tracing the stack by placing printlines into the code, which is painfully slow process, as well as unreliable (since printlines add delays into the code that often make problems dissapear).