Skip to content

Commit

Permalink
linux-user: Don't include gdbstub.h in qemu.h
Browse files Browse the repository at this point in the history
Currently the linux-user qemu.h pulls in gdbstub.h. There's no real reason
why it should do this; include it directly from the C files which require
it, and drop the include line in qemu.h.

(Note that several of the C files previously relying on this indirect
include were going out of their way to only include gdbstub.h conditionally
on not CONFIG_USER_ONLY!)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20210908154405.15417-9-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
  • Loading branch information
pm215 authored and vivier committed Sep 13, 2021
1 parent 3b249d2 commit 85b4fa0
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gdbstub.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
#include "qemu/cutils.h"
#include "qemu/module.h"
#include "trace/trace-root.h"
#include "exec/gdbstub.h"
#ifdef CONFIG_USER_ONLY
#include "qemu.h"
#else
#include "monitor/monitor.h"
#include "chardev/char.h"
#include "chardev/char-fe.h"
#include "exec/gdbstub.h"
#include "hw/cpu/cluster.h"
#include "hw/boards.h"
#endif
Expand Down
1 change: 1 addition & 0 deletions linux-user/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "qemu/osdep.h"
#include "exec/gdbstub.h"
#include "qemu.h"
#include "user-internals.h"
#ifdef CONFIG_GPROF
Expand Down
1 change: 1 addition & 0 deletions linux-user/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "qemu/module.h"
#include "qemu/plugin.h"
#include "exec/exec-all.h"
#include "exec/gdbstub.h"
#include "tcg/tcg.h"
#include "qemu/timer.h"
#include "qemu/envlist.h"
Expand Down
1 change: 0 additions & 1 deletion linux-user/qemu.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include "syscall_defs.h"
#include "target_syscall.h"
#include "exec/gdbstub.h"

/*
* This is the size of the host kernel's sigset_t, needed where we make
Expand Down
2 changes: 2 additions & 0 deletions linux-user/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/
#include "qemu/osdep.h"
#include "qemu/bitops.h"
#include "exec/gdbstub.h"

#include <sys/ucontext.h>
#include <sys/resource.h>

Expand Down
2 changes: 1 addition & 1 deletion semihosting/arm-compat-semi.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
#include "semihosting/console.h"
#include "semihosting/common-semi.h"
#include "qemu/timer.h"
#include "exec/gdbstub.h"
#ifdef CONFIG_USER_ONLY
#include "qemu.h"

#define COMMON_SEMI_HEAP_SIZE (128 * 1024 * 1024)
#else
#include "exec/gdbstub.h"
#include "qemu/cutils.h"
#ifdef TARGET_ARM
#include "hw/arm/boot.h"
Expand Down
2 changes: 1 addition & 1 deletion target/m68k/m68k-semi.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include "qemu/osdep.h"

#include "cpu.h"
#include "exec/gdbstub.h"
#if defined(CONFIG_USER_ONLY)
#include "qemu.h"
#define SEMIHOSTING_HEAP_SIZE (128 * 1024 * 1024)
#else
#include "exec/gdbstub.h"
#include "exec/softmmu-semi.h"
#include "hw/boards.h"
#endif
Expand Down
2 changes: 1 addition & 1 deletion target/nios2/nios2-semi.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
#include "qemu/osdep.h"

#include "cpu.h"
#include "exec/gdbstub.h"
#if defined(CONFIG_USER_ONLY)
#include "qemu.h"
#else
#include "qemu-common.h"
#include "exec/gdbstub.h"
#include "exec/softmmu-semi.h"
#endif
#include "qemu/log.h"
Expand Down

0 comments on commit 85b4fa0

Please sign in to comment.