zephyr/samples/subsys/debug/gdbstub
Anas Nashif 31c22c9a77 samples: gdbstub: test using pytest
Test gdb stub using pytest.

Co-developed-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-09-27 09:53:23 +02:00
..
boards debug: gdbstub: Move to DTS for uart device 2022-08-01 09:09:45 -07:00
pytest samples: gdbstub: test using pytest 2023-09-27 09:53:23 +02:00
src samples, tests, boards: Switch main return type from void to int 2023-04-14 07:49:41 +09:00
CMakeLists.txt samples: debug/gdbstub: update instructions to run 2021-11-30 15:24:00 -05:00
prj.conf debug: gdbstub: Move to DTS for uart device 2022-08-01 09:09:45 -07:00
README.rst doc: Migrate subsys/ code samples to new Sphinx extension 2023-09-21 09:28:31 +02:00
run.gdbinit samples: gdbstub: test using pytest 2023-09-27 09:53:23 +02:00
sample.yaml samples: gdbstub: test using pytest 2023-09-27 09:53:23 +02:00

.. zephyr:code-sample:: gdb-debug
   :name: GDB debug

   Use GDB Remote Serial Protocol to debug a Zephyr application running on QEMU.

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`.