Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset the offset in finding control block #1654

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KenMacD
Copy link

@KenMacD KenMacD commented Dec 18, 2023

This commit fixes an issue where the control block id was not found in cases where the bytes spanned two read blocks.

Example data block causing the original issue:

01:08:18.444,458] <dbg> SEGGER R

In this case the code skips 24 bytes, making the next loop start with:

SEGGER RTT\x00\x00\x00\x00…

Unfortunately offset is still 8, which the first byte does not match. The offset is then reset, but by that time the first byte has already been skipped over.

Re: #1553

This commit fixes an issue where the control block id was not found
in cases where the bytes spanned two read blocks.

Example data block causing the original issue:

`01:08:18.444,458] <dbg> SEGGER R`

In this case the code skips 24 bytes, making the next loop start with:

`SEGGER RTT\x00\x00\x00\x00…`

Unfortunately `offset` is still `8`, which the first byte does not
match. The offset is then reset, but by that time the first byte has
already been skipped over.
@elfmimi
Copy link

elfmimi commented Feb 4, 2024

Superseded by #1669 (proposal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants