qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 RESEND 1/7] gdbstub: only send stop-reply packets when all


From: Matheus Tavares Bernardino
Subject: Re: [PATCH v2 RESEND 1/7] gdbstub: only send stop-reply packets when allowed to
Date: Fri, 21 Apr 2023 08:31:01 -0300

Alex Bennée <alex.bennee@linaro.org> wrote:
>
> > Matheus Tavares <quic_mathbern@quicinc.com> wrote:
> >
> > diff --git a/gdbstub/user.c b/gdbstub/user.c
> > index 80488b6bb9..bb03622c83 100644
> > --- a/gdbstub/user.c
> > +++ b/gdbstub/user.c
> > @@ -174,12 +177,14 @@ void gdb_signalled(CPUArchState *env, int sig)
> >  {
> >      char buf[4];
> >  
> > -    if (!gdbserver_state.init || gdbserver_user_state.fd < 0) {
> > +    if (!gdbserver_state.init || gdbserver_user_state.fd < 0 ||
> > +        !gdbserver_state.allow_stop_reply) {
> >          return;
> >      }
> >  
> >      snprintf(buf, sizeof(buf), "X%02x", gdb_target_signal_to_gdb(sig));
> >      gdb_put_packet(buf);
> > +    gdbserver_state.allow_stop_reply = false;
> 
> Did I miss an equivalent for softmmu mode here?

Hmm, there doesn't seem to be other "X aa" stop-replies sent from
softmmu in our gdbstub. However, I just realize I did miss another spot
of "W aa" at gdbstub/user.c:gdb_exit(). I'll add the allow_stop_reply
guard there for the next iteration.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]