]> git.proxmox.com Git - mirror_qemu.git/commit
linux-user: Allow gdbstub to ignore page protection
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 29 Jan 2024 09:32:14 +0000 (10:32 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 29 Jan 2024 10:48:49 +0000 (20:48 +1000)
commit87ab270429618c13a6bf6dfc90d5edf6a3fa99b9
tree15511588c261ce025f2bdcb3ce60f2788bfb8d4a
parentfd3f7d24d48d3a70afe30af60bdbacdb993af945
linux-user: Allow gdbstub to ignore page protection

gdbserver ignores page protection by virtue of using /proc/$pid/mem.
Teach qemu gdbstub to do this too. This will not work if /proc is not
mounted; accept this limitation.

One alternative is to temporarily grant the missing PROT_* bit, but
this is inherently racy. Another alternative is self-debugging with
ptrace(POKE), which will break if QEMU itself is being debugged - a
much more severe limitation.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20240129093410.3151-2-iii@linux.ibm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
cpu-target.c