summaryrefslogtreecommitdiffstats
path: root/qemu-options.hx
diff options
context:
space:
mode:
authorPeter Maydell2020-04-03 11:40:14 +0200
committerPeter Maydell2020-04-14 14:15:40 +0200
commite5910d42dd7a12c66c3a0b050d5f1d2b00b99ea8 (patch)
tree3af5fef3652fcf4b5592e00e5f7032aa7a987020 /qemu-options.hx
parentscripts/coverity-scan: Add Docker support (diff)
downloadqemu-e5910d42dd7a12c66c3a0b050d5f1d2b00b99ea8.tar.gz
qemu-e5910d42dd7a12c66c3a0b050d5f1d2b00b99ea8.tar.xz
qemu-e5910d42dd7a12c66c3a0b050d5f1d2b00b99ea8.zip
docs: Improve our gdbstub documentation
The documentation of our -s and -gdb options is quite old; in particular it still claims that it will cause QEMU to stop and wait for the gdb connection, when this has not been true for some time: you also need to pass -S if you want to make QEMU not launch the guest on startup. Improve the documentation to mention this requirement in the executable's --help output, the documentation of the -gdb option in the manual, and in the "GDB usage" chapter. Includes some minor tweaks to these paragraphs of documentation since I was editing them anyway (such as dropping the description of our gdb support as "primitive"). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20200403094014.9589-1-peter.maydell@linaro.org
Diffstat (limited to 'qemu-options.hx')
-rw-r--r--qemu-options.hx24
1 files changed, 18 insertions, 6 deletions
diff --git a/qemu-options.hx b/qemu-options.hx
index 16debd03cb..292d4e7c0c 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3680,14 +3680,26 @@ SRST
ERST
DEF("gdb", HAS_ARG, QEMU_OPTION_gdb, \
- "-gdb dev wait for gdb connection on 'dev'\n", QEMU_ARCH_ALL)
+ "-gdb dev accept gdb connection on 'dev'. (QEMU defaults to starting\n"
+ " the guest without waiting for gdb to connect; use -S too\n"
+ " if you want it to not start execution.)\n",
+ QEMU_ARCH_ALL)
SRST
``-gdb dev``
- Wait for gdb connection on device dev (see
- :ref:`gdb_005fusage`). Typical connections will likely be
- TCP-based, but also UDP, pseudo TTY, or even stdio are reasonable
- use case. The latter is allowing to start QEMU from within gdb and
- establish the connection via a pipe:
+ Accept a gdb connection on device dev (see
+ :ref:`gdb_005fusage`). Note that this option does not pause QEMU
+ execution -- if you want QEMU to not start the guest until you
+ connect with gdb and issue a ``continue`` command, you will need to
+ also pass the ``-S`` option to QEMU.
+
+ The most usual configuration is to listen on a local TCP socket::
+
+ -gdb tcp::3117
+
+ but you can specify other backends; UDP, pseudo TTY, or even stdio
+ are all reasonable use cases. For example, a stdio connection
+ allows you to start QEMU from within gdb and establish the
+ connection via a pipe:
.. parsed-literal::