Message ID | 20231220162555.19545-4-nicolas.eder@lauterbach.com |
---|---|
State | New |
Headers | show |
Series | first version of mcdstub | expand |
Nicolas Eder <nicolas.eder@lauterbach.com> writes: > --- > debug/gdbstub/gdbstub.c | 8 -------- > include/exec/gdbstub.h | 8 ++++++++ > 2 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/debug/gdbstub/gdbstub.c b/debug/gdbstub/gdbstub.c > index f43d4355c0..5df7841878 100644 > --- a/debug/gdbstub/gdbstub.c > +++ b/debug/gdbstub/gdbstub.c > @@ -45,14 +45,6 @@ > > #include "internals.h" > > -typedef struct GDBRegisterState { > - int base_reg; > - int num_regs; > - gdb_get_reg_cb get_reg; > - gdb_set_reg_cb set_reg; > - const char *xml; > -} GDBRegisterState; > - > GDBState gdbserver_state; > > void gdb_init_gdbserver_state(void) > diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h > index d8a3c56fa2..cdbad65930 100644 > --- a/include/exec/gdbstub.h > +++ b/include/exec/gdbstub.h > @@ -27,6 +27,14 @@ typedef struct GDBFeatureBuilder { > 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); > > +typedef struct GDBRegisterState { > + int base_reg; > + int num_regs; > + gdb_get_reg_cb get_reg; > + gdb_set_reg_cb set_reg; > + const char *xml; > +} GDBRegisterState; > + There is a clash with the recent GDBFeature changes. I think this is still private to the debug sub-system so maybe it belongs in: debug/registers.h and then the subdirs can just do: #include "../registers.h" > /** > * gdb_register_coprocessor() - register a supplemental set of registers > * @cpu - the CPU associated with registers
diff --git a/debug/gdbstub/gdbstub.c b/debug/gdbstub/gdbstub.c index f43d4355c0..5df7841878 100644 --- a/debug/gdbstub/gdbstub.c +++ b/debug/gdbstub/gdbstub.c @@ -45,14 +45,6 @@ #include "internals.h" -typedef struct GDBRegisterState { - int base_reg; - int num_regs; - gdb_get_reg_cb get_reg; - gdb_set_reg_cb set_reg; - const char *xml; -} GDBRegisterState; - GDBState gdbserver_state; void gdb_init_gdbserver_state(void) diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index d8a3c56fa2..cdbad65930 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -27,6 +27,14 @@ typedef struct GDBFeatureBuilder { 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); +typedef struct GDBRegisterState { + int base_reg; + int num_regs; + gdb_get_reg_cb get_reg; + gdb_set_reg_cb set_reg; + const char *xml; +} GDBRegisterState; + /** * gdb_register_coprocessor() - register a supplemental set of registers * @cpu - the CPU associated with registers