Use when working with avrOSdb debugging. This handles VS Code extension or GDB debugging, such as RSP trace logs logic, debugging connection issues over RSP, UPDI, or TCP. Use when changing application debugging logic inside avrOSdb main.c or gdb_rsp.c or investigating lockups or target side state.
インストール
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Use when working with avrOSdb debugging. This handles VS Code extension or GDB debugging, such as RSP trace logs logic, debugging connection issues over RSP, UPDI, or TCP. Use when changing application debugging logic inside avrOSdb main.c or gdb_rsp.c or investigating lockups or target side state.
avrOSdb Application Debugging - AI Working Rules
This project implements an RSP gdbserver over UPDI.
Important States
RspContext: Holds global debug session state, including last_stop_cause, software track (sw_bp), and hardware track.
SC_NONE, SC_HWBREAK, SC_SWBREAK: These are stop cause states. Wait to emit last_stop_cause across vCont restarts — it must remain transient and not leak.
fsm: Real-Time OS thread tracking, parsing out FSM states into fake threads to VS Code. If a native-debug crash occurs, users might add --no-fsm-threads.
Key Files
src/gdb_rsp.c: Formats and parses GDB packets, translates vCont, continue, step, and parses breakpoints (Z0, Z1).
src/main.c: Connects the TCP socket, orchestrates event_loop, and clears states when the socket tears down.
Ensure last_stop_cause is cleared on TCP disconnect.
Do NOT trust GDB frontends to not loop over bad state (e.g. infinite unwind).
Output logs from RSP packets to see the wire communication. Can pass --log-rsp to avrOSdb and see it print on stdout/stderr, or AVROSDB_GDB_LOG_RSP=1 in make hw-test-gdb.
References
doc/reference/guesswork.md: Notes and reverse-engineered behaviours regarding UPDI and the AVR hardware debugging interface.
doc/reference/OCD.md: Rules and protocols for managing the AVR On-Chip Debugger (OCD).