Description
Hi @dankeboy36, thanks a lot for effort you put into making this incredibly useful plugin! I would like to check if you have already looked into implementing exception decoding for RISC-V chips, such as ESP32-C3? I found one mention of C3 in the tests but it seems that the code required to convert ESP32-C3 register+stack dumps into backtraces is missing.
Do you have something like that in progress, do you plan on implementing this, or would you like anyone from Espressif to open a PR with this implementation?
For reference: on RISC-V chips, by default we can only dump the registers and the stack, not the backtrace. Unwinding the stack to produce the backtrace on the chip itself is not possible, unless CONFIG_ESP_SYSTEM_USE_EH_FRAME option is enabled. (It is disabled by default, since it significantly increases application binary size.)
To perform stack unwinding, a tool running on the host PC is required. In ESP-IDF, this is done using gdb_panic_server.py which acts as a GDB server. GDB is launched, it connects to the script acting as a server, the script feeds GDB information from the stack dump as if it was coming from the real target, and finally GDB decodes the backtrace (code here).
This is slightly more complex than decoding backtraces on Xtensa chips, but since we already have access to GDB in this plugin, looks like this should be doable.