zephyr/samples/subsys/debug/gdbstub
Daniel Leung 917b3cf7c0 samples: debug/gdbstub: update instructions to run
This corrects the directory pointing to sample in the README
file. Also changes the TCP port number for the second serial
port exposing the GDB stub. This allows QEMU itself to expose
GDB interface through port 1234, and Zephyr's GDB stub at
port 5678.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-11-30 15:24:00 -05:00
..
src
CMakeLists.txt samples: debug/gdbstub: update instructions to run 2021-11-30 15:24:00 -05:00
prj.conf
README.rst samples: debug/gdbstub: update instructions to run 2021-11-30 15:24:00 -05:00
run.gdbinit
sample.yaml

.. _gdb_debug_sample:

GDB Debug Sample
################

Overview
********

A simple sample that can be used with QEMU to show debug using GDB
Remote Serial Protocol (RSP) capabilities.

Building and Running
********************

This application can be built and executed on QEMU as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/subsys/debug/gdbstub
   :host-os: unix
   :board: qemu_x86
   :goals: run
   :compact:

Open a new terminal and use gdb to connect to the running qemu as follows:

.. code-block:: bash

    gdb build/zephyr/zephyr.elf
    (gdb) target remote :5678

Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`.