[PATCH] Fix gdbreplay checksum calculation
Alexandra Petlanova Hajkova
ahajkova@redhat.com
Tue Dec 10 13:00:13 GMT 2024
On Mon, Dec 9, 2024 at 8:07 PM Tom Tromey <tromey@adacore.com> wrote:
> I needed to use gdbreplay today. It didn't work quite right, and
> using "set debug remote 1" showed that gdb was rejecting some
> responses like:
>
> [remote] Sending packet: $vCont?#49
> [remote] Junk: #vCont?
> [remote] Junk: 8vCont?
> [remote] Junk: 3vCont?
> [remote] Received Ack
>
> The checksum recalculation seems to have gone wrong. Looking at the
> code, it seems like 'where_csum' is calculated inconsistently: in the
> main loop it is after the '#' but in the "== 0" case it is before the
> '#'.
>
> This patch fixes the problem and also avoids a string copy.
>
> CC: Alexandra Hájková <ahajkova@redhat.com>
> ---
>
>
Hi Tom,
thank you for fixing this mistake of mine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://sourceware.org/pipermail/gdb-patches/attachments/20241210/6f9c0c68/attachment.htm>
More information about the Gdb-patches
mailing list