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 <CAOnWdogef52=wOvXxEg1ddtOSvv-uaGhuRxVXJXan4je6GF=0w@mail.gmail.com>
On Tue, 21 Jul 2020 at 21:24, Reuben Thomas <[email protected]> wrote:

> On Tue, 21 Jul 2020 at 20:34, Maciej W. Rozycki <[email protected]> wrote:
>
>> On Tue, 21 Jul 2020, Reuben Thomas wrote:
>>
>> > >  FYI, I do believe `?' is indeed mandatory, as GDB needs to figure
>> out the
>> > > initial state of the remote target as it has connected to it, and
>> there is
>> > > no other way.
>> >
>> > It seems to be more complicated than that. In principle, '?' isn't
>> needed
>> > in principle to figure out the initial state: the T packet, or in my
>> > current case, the S packet tells GDB the signal, and yet GDB still asks
>> for
>> > it again with '?'. The signal that caused the remote to halt is not
>> going
>> > to change until the next 'c', so there's no need for GDB to ask for it
>> > again; and yet it does.
>>
>
As I mentioned earlier, gdb discards this first 'T' packet, so that
explains why it needs to send '?', even in principle. But that doesn't seem
to be relevant, as gdb always sends '?' at the start of a conversation.
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.