Anybody interested in using a debugger?
Posted: Mon Jun 29, 2015 1:26 am
Dear IoT entusiasts!
Is there any interest on using a debugger like gdb to analyze your programs running on the esp8266?
Using gdb directly or one of the multiple frontends like eclipse you could
I am asking this because new replies on the threads talking about debuggers are discouraging low.
(Debugging via jtag (http://www.esp8266.com/viewtopic.php?f=9&t=1871) or using an embedded gdb stub
( http://www.esp8266.com/viewtopic.php?f=9&t=3734, http://www.esp8266.com/viewtopic.php?f=9&t=3751 ))
Is that because you think you can't help in building the debug solution or do you think it is not needed or useful or you don't know or don't care?
Curious,
Cal
P.S.
For debugging via JTAG you need additional hardware that controls the CPU.
A gdb stub is an object file/library that gets linked to and adds code to your firmware file and gets activated by calling some init function or entered directly. In case of the esp8266 it talks to the debugger that runs on your pc over the serial interface.
The linked tale shows an example.
Is there any interest on using a debugger like gdb to analyze your programs running on the esp8266?
Using gdb directly or one of the multiple frontends like eclipse you could
- step to your code on C and/or assembler level,
- inspect registers/variables/memory
- set breakpoints in code,
- set watchpoints on memory changes,
- enter debugger on exceptions like exceptions 28 or 29 (illegal read or write access)
- print and inspect call stacks
I am asking this because new replies on the threads talking about debuggers are discouraging low.
(Debugging via jtag (http://www.esp8266.com/viewtopic.php?f=9&t=1871) or using an embedded gdb stub
( http://www.esp8266.com/viewtopic.php?f=9&t=3734, http://www.esp8266.com/viewtopic.php?f=9&t=3751 ))
Is that because you think you can't help in building the debug solution or do you think it is not needed or useful or you don't know or don't care?
Curious,
Cal
P.S.
For debugging via JTAG you need additional hardware that controls the CPU.
A gdb stub is an object file/library that gets linked to and adds code to your firmware file and gets activated by calling some init function or entered directly. In case of the esp8266 it talks to the debugger that runs on your pc over the serial interface.
The linked tale shows an example.