gdbserver: Fix incorrect assertion
authorPedro Alves <pedro@palves.net>
Thu, 25 Nov 2021 19:07:36 +0000 (19:07 +0000)
committerPedro Alves <pedro@palves.net>
Mon, 21 Mar 2022 16:45:49 +0000 (16:45 +0000)
commit04f0c03a22135c7eefa47ed99c03e5b3dc9a34e2
treec1951eea49e6c03c0b5bf5ec1c9c92da596a4464
parentf55649cc9bcb92405d49af6bdcde6e69ac4d1c49
gdbserver: Fix incorrect assertion

While playing with adding a new event kind, I noticed that
prepare_resume_reply TARGET_WAITKIND_FORKED, etc. advance 'buf', so if
we force-disable the T packet, we'd fail the *buf == 'T' assertion.

Fix it by tweaking the assertion to always look at the beginning of
the buffer.

Change-Id: I8c38e32353db115edcde418b3b1e8ba12343c22b
gdbserver/remote-utils.cc