[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/14] docs/system: clarify limits of using gdbstub in system emul
|
From: |
Alex Bennée |
|
Subject: |
[PULL 08/14] docs/system: clarify limits of using gdbstub in system emulation |
|
Date: |
Thu, 23 Nov 2023 15:56:14 +0000 |
It seems some users will try and use the gdbstub to debug userspace
inside a system emulation. While possible clarify the limitations of
this approach and direct the users to a less head scratching way of
debugging user-space.
Clarifies: https://gitlab.com/qemu-project/qemu/-/issues/1274
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231120150833.2552739-9-alex.bennee@linaro.org>
diff --git a/docs/system/gdb.rst b/docs/system/gdb.rst
index 9906991b84..4228cb56bb 100644
--- a/docs/system/gdb.rst
+++ b/docs/system/gdb.rst
@@ -60,7 +60,7 @@ As TCG cannot track all memory accesses in user-mode there is
no
support for watchpoints.
Relocating code
----------------
+===============
On modern kernels confusion can be caused by code being relocated by
features such as address space layout randomisation. To avoid
@@ -68,6 +68,17 @@ confusion when debugging such things you either need to
update gdb's
view of where things are in memory or perhaps more trivially disable
ASLR when booting the system.
+Debugging user-space in system emulation
+========================================
+
+While it is technically possible to debug a user-space program running
+inside a system image, it does present challenges. Kernel preemption
+and execution mode changes between kernel and user mode can make it
+hard to follow what's going on. Unless you are specifically trying to
+debug some interaction between kernel and user-space you are better
+off running your guest program with gdb either in the guest or using
+a gdbserver exposed via a port to the outside world.
+
Debugging multicore machines
============================
--
2.39.2
- [PULL 00/14] random fixes for 8.2 (tests, plugins, docs, semihosting), Alex Bennée, 2023/11/23
- [PULL 01/14] tests/docker: replace fedora-i386 with debian-i686, Alex Bennée, 2023/11/23
- [PULL 02/14] .gitlab-ci.d/cirrus: Upgrade macOS to 13 (Ventura), Alex Bennée, 2023/11/23
- [PULL 06/14] tests/tcg: fixup Aarch64 semiconsole test, Alex Bennée, 2023/11/23
- [PULL 03/14] tests/docker: merge debian-native with debian-amd64, Alex Bennée, 2023/11/23
- [PULL 04/14] plugins: fix win plugin tests on cross compile, Alex Bennée, 2023/11/23
- [PULL 10/14] testing: move arm system tests into their own folder, Alex Bennée, 2023/11/23
- [PULL 08/14] docs/system: clarify limits of using gdbstub in system emulation,
Alex Bennée <=
- [PULL 05/14] target/nios2: Deprecate the Nios II architecture, Alex Bennée, 2023/11/23
- [PULL 11/14] tests/tcg: enable arm softmmu tests, Alex Bennée, 2023/11/23
- [PULL 07/14] docs/emulation: expand warning about semihosting, Alex Bennée, 2023/11/23
- [PULL 12/14] tests/tcg: enable semiconsole test for Arm, Alex Bennée, 2023/11/23
- [PULL 13/14] configure: don't try a "native" cross for linux-user, Alex Bennée, 2023/11/23
- [PULL 14/14] tests/tcg: finesse the registers check for "hidden" regs, Alex Bennée, 2023/11/23
- [PULL 09/14] hw/core: skip loading debug on all failures, Alex Bennée, 2023/11/23
- Re: [PULL 00/14] random fixes for 8.2 (tests, plugins, docs, semihosting), Stefan Hajnoczi, 2023/11/27