Re: Remote protocol question: the documentation says '?' is not required, but maybe it is?

Reuben Thomas via Gdb <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <CAOnWdoj9cedasK7xkfsiKWr52Lu8xrgNVuuwb9mhM5W8JNzUDw@mail.gmail.com>
On Tue, 21 Jul 2020 at 11:22, Christo Crause <[email protected]>
wrote:


> Reading E.3 suggests that the stop reply packet (S or T) is only expected
> after gdb issued one of a few specific commands.  So my interpretation (I'm
> no expert on the topic) is that your unsolicited T packet is confusing gdb.
> It seems as if your debug log is from your gdbserver perspective, can you
> also check the communication received on gdb side (set debug remote 1),
> this may highlight the reply gdb is complaining about.
>

Thanks for getting back to me! I don't think you're right, for two reasons:
first, I am sending the T packet in response to 'c'. (Except the first
time, when of course I didn't get a command, but effectively this is the
stub returning from 'c'.) Secondly, I copied this code from sparc-stub.c in
the GDB sources.

Also, whether or not I send T does not affect GDB's behaviour. In fact, I
shortened my code by changing it to send an S packet instead, which also
works fine, but still GDB needs me to implement '?'. The "invalid remote
reply" is in response to the stub sending an empty reply to "?".

-- 
https://rrt.sc3d.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.