esp-gdbstub: cannot view local variables

esp03madness
Posts: 8
Joined: Tue Nov 24, 2015 11:42 am

esp-gdbstub: cannot view local variables

Postby esp03madness » Fri Jan 15, 2016 1:36 pm

Hello friends,

I have integrated esp-gdbstub into a project, and am able to do breakpoints, stepping, etc.

However, when I do a backtrace at a breapoint, all the function parameters are labelled with "error reading variable: can't compute CFA for this frame" and cannot be printed. Same effect is seen when trying to examine some (but not all) local variables.

What is the cause of this behavior and how do I work around it?

ESP_Sprite
Posts: 25
Joined: Fri Oct 24, 2014 7:58 pm

Re: esp-gdbstub: cannot view local variables

Postby ESP_Sprite » Thu Jan 21, 2016 5:26 pm

As far as I understand it, that is a bug in gdb; because of some optimizations gcc does, some variables may be in registers or not available at all, and gdb doesn't know about that. You can try recompiling your code with -Og instead of -Os or whatever -Ox setting you're using now.

rajkumar patel
Posts: 12
Joined: Fri Mar 03, 2017 8:20 pm

Re: esp-gdbstub: cannot view local variables

Postby rajkumar patel » Tue Aug 08, 2017 9:20 pm

Hello,

i've also tried using gdbstub to debugg my esp8266.
i'm able to stop the execution as soon as i start the session using gdb tool*(esp-idf provided gdb tool i'm using. i.e. xtensa-esp32-elf-gdb).
but then i'm facing an issue which could be seen in attached image.

gdbstub_timeout_issue.JPG
this file contains gdbstub running issue while activing the gdb session.


exact same issue i've found, on esp32 forum, which was getting produced while stepping into debugging session using openOCD - JTAG method.
that thread is here :
https://www.esp32.com/viewtopic.php?f=2 ... 2de8915fff

how could i overcome this issue? please provide your valuable suggestions and shade some light on this.

thanks.

Who is online

Users browsing this forum: Bing [Bot] and 5 guests