All Projects → vlad-ivanov-name → esp-gdbstub

vlad-ivanov-name / esp-gdbstub

Licence: other
ESP8266 debugging tool

Programming Languages

c
50402 projects - #5 most used programming language
assembly
5116 projects
lua
6591 projects
GDB
78 projects

Projects that are alternatives of or similar to esp-gdbstub

gdbstub
An ergonomic and easy-to-integrate implementation of the GDB Remote Serial Protocol in Rust, with full no_std support.
Stars: ✭ 158 (+1115.38%)
Mutual labels:  debugger, gdb
gdbundle
Minimalist plugin manager for GDB and LLDB
Stars: ✭ 72 (+453.85%)
Mutual labels:  debugger, gdb
insight
A Tcl/Tk Frontend for GDB. This is an AppImage(Portable Package) of insight for the sake of Jeff Duntemann's amazing book.
Stars: ✭ 31 (+138.46%)
Mutual labels:  debugger, gdb
lldbg
A lightweight native GUI for LLDB.
Stars: ✭ 83 (+538.46%)
Mutual labels:  debugger, gdb
Gdb Frontend
☕ GDBFrontend is an easy, flexible and extensionable gui debugger.
Stars: ✭ 2,104 (+16084.62%)
Mutual labels:  debugger, gdb
metal.test
Deprecated, superseded by https://github.com/metal-ci/test
Stars: ✭ 41 (+215.38%)
Mutual labels:  debugger, gdb
Lldb
Project moved to: https://github.com/llvm/llvm-project
Stars: ✭ 412 (+3069.23%)
Mutual labels:  debugger, gdb
gdb
Go GDB/MI interface
Stars: ✭ 70 (+438.46%)
Mutual labels:  debugger, gdb
Gdbgui
Browser-based frontend to gdb (gnu debugger). Add breakpoints, view the stack, visualize data structures, and more in C, C++, Go, Rust, and Fortran. Run gdbgui from the terminal and a new tab will open in your browser.
Stars: ✭ 8,339 (+64046.15%)
Mutual labels:  debugger, gdb
Rr
Record and Replay Framework
Stars: ✭ 6,469 (+49661.54%)
Mutual labels:  debugger, gdb
Code Debug
Native debugging for VSCode
Stars: ✭ 232 (+1684.62%)
Mutual labels:  debugger, gdb
Pyvmidbg
LibVMI-based debug server, implemented in Python. Building a guest aware, stealth and agentless full-system debugger
Stars: ✭ 192 (+1376.92%)
Mutual labels:  debugger, gdb
gdb-dashboard
Modular visual interface for GDB in Python
Stars: ✭ 8,699 (+66815.38%)
Mutual labels:  debugger, gdb
madbomber
Backtrace-on-throw C++ exception logger
Stars: ✭ 17 (+30.77%)
Mutual labels:  debugger, gdb
kakoune-gdb
gdb integration plugin
Stars: ✭ 44 (+238.46%)
Mutual labels:  debugger, gdb
Dlangide
D language IDE based on DlangUI
Stars: ✭ 358 (+2653.85%)
Mutual labels:  debugger, gdb
hello-world-gdb
Simple hello world program for debugging with gdb
Stars: ✭ 29 (+123.08%)
Mutual labels:  debugger, gdb
vim-easydebugger
A VIM multi-language debugger plugin
Stars: ✭ 47 (+261.54%)
Mutual labels:  debugger, gdb
Voltron
A hacky debugger UI for hackers
Stars: ✭ 5,599 (+42969.23%)
Mutual labels:  debugger, gdb
Angrgdb
Use angr inside GDB. Create an angr state from the current debugger state.
Stars: ✭ 165 (+1169.23%)
Mutual labels:  debugger, gdb

esp-gdbstub

Intro

ESP8266 debugging tool intended to be used with esp-open-rtos. Based on Espressif/esp-gdbstub.

Usage

  1. Build requires premake5 and xtensa-lx106-elf toolchain. Make sure both are in your PATH.

  2. Configure with premake5 gmake. The following options are supported:

    • --with-eor=/path/to/esp-open-rtos: this option is required. It should point to an actual esp-open-rtos location.
    • --with-threads: enable RTOS task debugging. As for now, there is very basic support of threads, you will be able to see multiple tasks when a breakpoint is hit, but GDB will most likely crash shorlty after. This option also has a performance impact because a lot of data will be transferred through serial connection — consider increasing the baudrate.

    When thread support is enabled, you need to add the following definitions to CFLAGS of your project before compiling FreeRTOS libs:

    EXTRA_CFLAGS+=-DportREMOVE_STATIC_QUALIFIER -DINCLUDE_pcTaskGetTaskName=1
    
    # The line above should go before including common.mk
    

    Run make clean after switching the state of this flag.

  3. Run make

  4. Add library to your project:

    PROGRAM=blink
    
    # Order is important!
    
    EXTRA_CFLAGS+=-I../../../esp-gdbstub/include
    EXTRA_LDFLAGS+=-L../../../esp-gdbstub/lib
    
    include ../../common.mk
    
    LIBS+=esp-gdbstub
    PROGRAM_CFLAGS+=-O0
  5. Call gdbstub_init() after configuring UART speed.

Optimization, stack trace resolving and GDB

It has been observed that GDB may crash when user requests step over source in a file compiled with optimization turned on. I haven't figured out why exactly this happens, but it has something to do with stack frame resolving. Turning optimization off for the whole project would impact performance and code size — that's why only PROGRAM_CFLAGS is modified.

Eclipse CDT setup

To use Eclipse CDT for debugging, open Eclipse, create a new project and create a debug configuration for C/C++ Remote Application.

You need to set the following options:

  1. Main → Application: Firmware ELF
  2. Debugger: Uncheck “Stop on startup at: main”
  3. Debugger → Main: select GDB binary and .gdbinit file provided with esp-gdbstub
  4. Debugger → Connection → Type: Serial
  5. Debugger → Connection → Speed: 115200

Note that upon launching the debug session gdb will send “continue” command if the target is paused at gdbstub_do_break. If you want to stop right after debug session launch, place gdbstub_do_break macro twice in your code.

Notes

  • Using software breakpoints ('br') only works on code that's in RAM. Code in flash can only have a hardware breakpoint ('hbr'). If you know where you want to break before downloading the program to the target, you can use gdbstub_do_break() macro as much as you want.
  • Due to hardware limitations, only one hardware breakpount and one hardware watchpoint are available.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].