2d3d2517cc
gdbstub: Build syscall.c once
...
There is no longer anything target specific.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20230303025805.625589-29-richard.henderson@linaro.org >
2023-03-07 20:44:09 +00:00
0820a075af
gdbstub: Adjust gdb_do_syscall to only use uint32_t and uint64_t
...
Pass %x as uint32_t and %lx as uint64_t; pass the address
of %s as uint64_t and the length as uint32_t.
Add casts in semihosting/syscalls.c from target_ulong to
uint64_t; add casts from int to uint32_t for clarity.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20230303025805.625589-28-richard.henderson@linaro.org >
2023-03-07 20:44:09 +00:00
2f70f2d791
gdbstub: Remove gdb_do_syscallv
...
This function is unused, except to implement gdb_do_syscall.
Fold the implementations together.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20230303025805.625589-27-richard.henderson@linaro.org >
2023-03-07 20:44:09 +00:00
131f387d74
gdbstub: split out softmmu/user specifics for syscall handling
...
Most of the syscall code is config agnostic aside from the size of
target_ulong. In preparation for the next patch move the final bits
of specialisation into the appropriate user and softmmu helpers.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20230302190846.2593720-26-alex.bennee@linaro.org >
Message-Id: <20230303025805.625589-26-richard.henderson@linaro.org >
2023-03-07 20:44:09 +00:00
c566080cd3
gdbstub: move syscall handling to new file
...
Our GDB syscall support is the last chunk of code that needs target
specific support so move it to a new file. We take the opportunity to
move the syscall state into its own singleton instance and add in a
few helpers for the main gdbstub to interact with the module.
I also moved the gdb_exit() declaration into syscalls.h as it feels
pretty related and most of the callers of it treat it as such.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20230302190846.2593720-22-alex.bennee@linaro.org >
Message-Id: <20230303025805.625589-22-richard.henderson@linaro.org >
2023-03-07 20:44:08 +00:00