Q: who maintains the STOPPED/RUNNING state?
Oleg Nesterov
oleg@redhat.com
Wed Jul 21 10:51:00 GMT 2010
On 07/21, Oleg Nesterov wrote:
>
> On 07/20, Frank Ch. Eigler wrote:
> >
> > Oleg Nesterov <oleg-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> writes:
> >
> > > [...]
> > > Who maintains this state? gdb, server, both? To illustrate, suppose
> > > that ugdb receives
> > > $c <--- resumes the tracee
> > > $g <--- asks general registers
> > > What should ugdb do?
> >
> > Even if the protocol documentation theoretically permits this,
> > if actual gdb does not send it, and actual gdbserver does not
> > specifically handle it, you don't have to worry about it.
>
> I'd like to know how can I check that gdb can't do this.
It can. It doesn't send exactly '$g' because it has its own cache,
but it can send, say, '$m' when the tracee is running. gdbserver
returns E01 in this case.
> so I'll assume ugdb should return E01.
Yes.
Hmm. Speaking of '$m', I looked in the sources and noticed by
accident that read_inferior_memory() "hides" the breakpoints
inserted by gdbserver.
Of course, this is not documented in gdb.info too.
Oleg.
More information about the Archer
mailing list