Is it possible to set break point and restart app only through serial monitor

User avatar
Gfast2
Posts: 182
Joined: Fri Aug 11, 2017 1:52 am

Is it possible to set break point and restart app only through serial monitor

Postby Gfast2 » Tue Nov 28, 2017 9:34 am

Hi ESP-IDF, gfast2 here again. :P

It takes time to setup JTAG Debugger.

I just wunder if it is still possible after I encounter core panic and trigger the gdb in serial monitor, I still have some interaction with my app on ESP32. For instance, I can list where I was, or info locals to list local variable values.

But say how to break fileToSetBreakPoint.c 123, and send command to let gdb restart the app? :?:

(P.s: I did spent sometime on reading doc "How to Debugging" :mrgreen: )

Cheers

Gfast2

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: Is it possible to set break point and restart app only through serial monitor

Postby ESP_Sprite » Tue Nov 28, 2017 12:20 pm

You can't; the serial gdb stub is forensic-only, as in you can only use it to inspect the state of the crashed code, not resume it. If you need a breakpoint, you can actually do this in code (see esp32/panic.c, function setFirstBreakpoint for an example) but again, as soon as you hit the breakpoint you need to restart the ESP32 to continue.

User avatar
Gfast2
Posts: 182
Joined: Fri Aug 11, 2017 1:52 am

Re: Is it possible to set break point and restart app only through serial monitor

Postby Gfast2 » Tue Nov 28, 2017 12:56 pm

Hi Esp_Sprite,

Thanks for your clear answer!

It looks like I do need hook a OpenOCD for my debug. Its really get messy here! Without a debugging tool, port "open62541" library is the mission impossible... :cry:

Cheers

Gfast2

Who is online

Users browsing this forum: No registered users and 75 guests