How to interpret Backtrace

Hi. I'm using arduino_cli on macOS with an Adafruit ESP32 feather. All works great but I can't find a command to interpret Backtrace. I know there is a plugin for the Arduino IDE but I'm not using that for this project. An example output of what I would like to decode is:

`abort() was called at PC 0x40138e27 on core 1

Backtrace:0x4008373d:0x3ffb25100x4008b989:0x3ffb2530 0x40090d71:0x3ffb2550 0x40138e27:0x3ffb25d0 0x40138e6e:0x3ffb25f0 0x40138c13:0x3ffb2610 0x40138746:0x3ffb2630 0x40138c6d:0x3ffb2650 0x400d5777:0x3ffb2670 0x400d67c6:0x3ffb26b0 0x400d3689:0x3ffb26d0 0x400d89cd:0x3ffb2820`

Maybe something like this?

Or this?

Thanks for the ideas. However those are designed to decode the track format shown in the IDE. Unfortunately this is completely different from the trace reported by arduino_cli. I would think arduino_cli would have its own command for this. I could try making something myself if I knew where the linker symbol table was stored.

Interesting, I expected arduino-cli to be fully compatible with the IDE.

So this is not purely a formatting problem, the actual data is different too?

The plugin search for the builded .elf file inside the temporary folder created from IDE.

If you launch the plugin without compiling, you will be prompted to manually load the elf file,.
You can select the file generated by Arduino CLI and then copy and paste the backtrace log.

Correct, the format of the exception report is completely different.

I have made progress. I found the xtensa-esp32-elf-gcc-nm program and ran it on the bin created by arduino-cli. Then by looking for symbol addresses near the values in the first address of each pair in the backtrace, I worked out which function each address was in, and thus made a complete stack trace, which lead me to my problem. Success! But if I have to do this again I will Indefinitely write a little perl script to do it automatically.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.