On 1/5/23 08:43, Alex Bennée wrote:
+++ b/gdbstub/syscalls.c @@ -0,0 +1,230 @@ +/* + * GDB Syscall Handling + * + * GDB can execute syscalls on the guests behalf, currently used by + * the various semihosting extensions. As this interfaces with a guest + * ABI we need to build it per-guest (although in reality its a 32 or + * 64 bit target_ulong that is the only difference). + * + * Copyright (c) 2003-2005 Fabrice Bellard + * Copyright (c) 2023 Linaro Ltd + * + * SPDX-License-Identifier: LGPL-2.0+ + */ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "semihosting/semihost.h" +#include "sysemu/runstate.h" +#include "gdbstub/user.h" +#include "gdbstub/syscalls.h" +#include "trace.h" +#include "internals.h" + +/* Common state */ +extern GDBState gdbserver_state;
This belongs in internals.h; I should have picked up on it earlier vs the other incorrect delarations in softmmu.c, user.c, user-target.c.
Otherwise, Reviewed-by: Richard Henderson <richard.hender...@linaro.org> r~