Fix GDB backtraces in optimized builds (GitHub PR) Closes IDFGH-6444 See merge request espressif/esp-idf!16436