stephane duverger <stephane.duver...@gmail.com> writes:
> Hi, > > This is a small patch to gdbstub rather insignificant at first sight: > fix null pointer dereference. It actually allows to take benefit of > gdb features (breakpoints/sstep) internally (ie. special purpose > board) without connecting a gdb client to the Qemu instance gdbserver > stub. There don't seem to be any other patches attached? I would NACK a patch that isn't actually used in-tree. I would also like to see how this would be used because we certainly have different paths for KVM and TCG break-point emulation that don't need to go through the gdbstub to achieve what they are doing. > > Regards, > > Signed-off-by: Stephane Duverger <stephane.duver...@gmail.com> > --- > gdbstub.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/gdbstub.c b/gdbstub.c > index d6ab95006c..788fd625ab 100644 > --- a/gdbstub.c > +++ b/gdbstub.c > @@ -1412,6 +1412,9 @@ static int gdb_handle_packet(GDBState *s, const char > *line_buf) > > void gdb_set_stop_cpu(CPUState *cpu) > { > + if (!gdbserver_state) { > + return; > + } > gdbserver_state->c_cpu = cpu; > gdbserver_state->g_cpu = cpu; > } -- Alex Bennée