Skip to content
Snippets Groups Projects
Commit 1c4517b8 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Alex Bennée
Browse files

gdbstub: Make syscall_complete/[gs]et_reg target-agnostic typedefs


Prototypes using gdb_syscall_complete_cb() or gdb_?et_reg_cb()
don't depend on "cpu.h", thus are not target-specific.

Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
Message-Id: <20221214143659.62133-1-philmd@linaro.org>
Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
Message-Id: <20230302190846.2593720-4-alex.bennee@linaro.org>
Message-Id: <20230303025805.625589-4-richard.henderson@linaro.org>
parent 9455762f
No related branches found
No related tags found
No related merge requests found
......@@ -71,9 +71,6 @@ struct gdb_timeval {
uint64_t tv_usec; /* microsecond */
} QEMU_PACKED;
#ifdef NEED_CPU_H
#include "cpu.h"
typedef void (*gdb_syscall_complete_cb)(CPUState *cpu, uint64_t ret, int err);
/**
......@@ -126,6 +123,7 @@ int gdb_handlesig(CPUState *, int);
void gdb_signalled(CPUArchState *, int);
void gdbserver_fork(CPUState *);
#endif
/* Get or set a register. Returns the size of the register. */
typedef int (*gdb_get_reg_cb)(CPUArchState *env, GByteArray *buf, int reg);
typedef int (*gdb_set_reg_cb)(CPUArchState *env, uint8_t *buf, int reg);
......@@ -133,6 +131,9 @@ void gdb_register_coprocessor(CPUState *cpu,
gdb_get_reg_cb get_reg, gdb_set_reg_cb set_reg,
int num_regs, const char *xml, int g_pos);
#ifdef NEED_CPU_H
#include "cpu.h"
/*
* The GDB remote protocol transfers values in target byte order. As
* the gdbstub may be batching up several register values we always
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment