liveBook · Manning

GDB server

As explained in Embedded Software with Rust

A GDB server is a program that mediates between GDB's remote protocol and a target debug probe, translating debugger requests into probe-specific operations.

A GDB server bridges GDB and the hardware debug probe. GDB sends requests using its remote serial protocol; the server translates them into probe-specific operations for the target’s JTAG or SWD interface. section 6.5.2

The debugging path runs from GDB on the host, through the server and probe, to the target MCU. The server handles operations such as flashing, resetting, halting, stepping, setting breakpoints, and reading memory. OpenOCD, probe-rs, and pyocd can serve this role. section 6.1.2 section 6.5.5

source [find interface/stlink.cfg]
source [find target/stm32f1x.cfg]

A minimal OpenOCD configuration names the attached debug adapter and target chip. section 6.5.5

A typical session starts the server separately, connects GDB to its TCP port, then loads firmware and resets the target. OpenOCD commonly listens on port 3333; GDB can connect with extended-remote mode. section 6.5.4 section 6.5.6

How Embedded Software with Rust covers it

How deep it goes
Explains the protocol and hardware path, OpenOCD configuration, and launch workflow without detailing probe internals.
Examples
Uses OpenOCD configuration files, TCP port 3333, and a two-terminal flash-and-debug session.
What you can do after
Operate/configure it by selecting probe and target scripts, starting OpenOCD, then attaching GDB to flash and debug.
How it connects
Connects GDB with OpenOCD, probe-rs, pyocd, debug probes, JTAG, and SWD.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Embedded Software with Rust. The section links point to the parts of the book it draws on.