-
Notifications
You must be signed in to change notification settings - Fork 6
unble to decode stack. #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, thanks for taking the time to submit the report.
Yes, you can use the Serial Monitor in IDE 1.x to view the output and paste it into the decoder terminal in IDE 2.x. (I am not entirely sure if the default sketch build folder used by IDE 1.x is the same as the CLI-based one used by IDE 2.x. To be safe, it’s best to compile and upload only through IDE 2.x. Can you reproduce the same issue if you use only IDE 2.x?) Please note: if you use IDE 1.x only for the Serial Monitor, make sure to manually close the Serial Monitor in IDE 1.x before compiling or uploading in IDE 2.x. Otherwise, the board may stay busy and the upload can fail.
Thanks for correctly formatting and sharing the stack trace. Could you also share the ELF file? It would increase the chances that I can reproduce and debug the issue. You can attach the ELF file to GitHub inside a ZIP archive. If you are only using IDE 2.x for the ESP decoder extension for RISC-V, you might also want to try my new CLI-based decoder. It’s a work in progress, but it should already be able to decode what the IDE 2.x extension does: https://github.com/dankeboy36/trbr. |
At first I was using IDE 1.8.19 when the crash occured. There is no trace decoder for the ESP32C3 on IDE 1.x and I found your decoder but for IDE 2.x and so switched to IDE 2.x and also got the crash. Concerning the ELF file: I will rebuild a zip file with the log the ELF corresponding. I think I have changed my testcase and need to register a "clean" crash .... |
I made a new compilation/run/crash. Here are 2 files: the .elf and the stack/registerd dump. |
Thanks for the ZIP. I confirm the raw stdout from GDB shows more info than the decoder extension. The line parser must be relaxed, much more relaxed:
However, the raw GDB output does not show the problem either. I wrote a short script to use The output is still super noisy, and it's just a standalone script, but it looks better. Perhaps this could be the problem:
Click to see the full output
I am going to keep an eye on this problem, but I cannot promise a quick fix for it. |
Thank you for these results. I'll have a look. |
Thanks for using the decoder for your lib development I have been tweaking the logic a bit further using gdb only, and the decoder can produce this fallback trace by getting the info for every distinct address:
The updated logic retrieves info from https://github.com/espressif/esp-idf/blob/38628f98b9000ded87827dccbd8a5a1827392cfb/components/esp_rom/esp32c3/ld/esp32c3.rom.ld. I am not an ESP32 dev. Do you consider the updated version more helpful, or is it just more decoded lines that do not help anything? I want to understand if adding such a feature would eventually help the development or just add unnecessary code to this project. |
Don’t know what to answer … |
Yes, that's part of it — but it’s not limited to just that. Every address gets queried through GDB for details like address, line, symbol, functions, variables, and even source list if possible. For addresses that don't match the application's source code, the logic falls back to a ROM symbol list, similar to how ESP-IDF handles it:
I haven't figured it all out fully yet, but yes, in theory, a static lookup table per target and release could be maintained and used as a last-resort fallback.
Thanks for the honest feedback — I appreciate it. I'll leave the issue open in case it proves helpful later. By the way, I'm working on a side project to decode ESP coredumps — crash happens, dump + ELF get sent to a server and decoded. Still rough, but if you ever hit a crash and can share the dump + ELF, I'd love to see if we can extract more from it: |
ESP32 C3
Arduino IDE 2.3.6
ESP32 arduino core 3.2.0
After a crash, I tried the Exception decoder (release 1.1.0) but only get the following result:
Question: is the decoder usable in Arduino IDE 1.x.y ?. Copy/pasting a large amount of data from Serial Monitor IDE 2.x.y is really a pain ...
Here is the full data pasted in the decoder:
The text was updated successfully, but these errors were encountered: