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

debugger: search range off by one? #1127

Closed
peterferrie opened this issue Sep 1, 2022 · 9 comments
Closed

debugger: search range off by one? #1127

peterferrie opened this issue Sep 1, 2022 · 9 comments
Labels
Milestone

Comments

@peterferrie
Copy link

example, s 0:1fff dd
will search only 0..1ffe. I expected it to look at 1fff, too.
If it's intentional, then I'll have to be more careful.

@tomcw tomcw added the bug label Sep 1, 2022
@tomcw
Copy link
Contributor

tomcw commented Sep 1, 2022

The notation you are using is s <address-start>:<length> <hex>, so for the specific example you gave, with a length of 1fff it will only search [0...1ffe].

There is alternate notation (using comma instead of colon) which is: s <address-start>,<address-end> <hex>, which should search [0...1fff].

EDIT: the above notation is wrong (I got it backwards)... see below!

But when I tried this there is an off-by-one bug.
So let me get this fixed, and then supply you with an update.

@peterferrie
Copy link
Author

peterferrie commented Sep 1, 2022 via email

@tomcw
Copy link
Contributor

tomcw commented Sep 1, 2022

':' appears to be interpreted as an end address

Yes, you're right (I got it backwards)...

help-s

Regardless, there's still an off-by-one bug.

@tomcw
Copy link
Contributor

tomcw commented Sep 1, 2022

Repro:

4000:A9 41 85 01
40FE:A9 41 85 01

; Quick tests for "found" case
s 4000:4003 1
s 4000,4 1
s 40FE:4101 1
s 40FE,4 1

s 4000,4 A9 41
s 4000,4 41 85
s 4000,4 85 1
s 40FE,4 A9 41
s 40FE,4 41 85
s 40FE,4 85 1

s 4000,4 A9 41 85
s 4000,4 41 85 1
s 40FE,4 A9 41 85
s 40FE,4 41 85 1

s 4000,4 A9 41 85 1
s 40FE,4 A9 41 85 1

; Quick tests for "not found" case
s 4000:4002 1
s 4000,3 1
s 40FE:4100 1
s 40FE,3 1

; Other tests:
s d000:ffff "FLAS"
s d000,3fff "FLAS"

s ffff:ffff c3
s ffff,1 c3

NB. address , length is correctly bounds checked, and gets capped to 0xFFFF if it exceeds 64KiB.

tomcw added a commit that referenced this issue Sep 1, 2022
@tomcw tomcw added this to the 1.30.12 milestone Sep 1, 2022
@tomcw
Copy link
Contributor

tomcw commented Sep 1, 2022

@peterferrie - here's a point-release which fixes #1126 and this one:
AppleWin-1.30.11.1.zip

Can you give it a go, and confirm that it fixes things for you? (I'll do a proper release soon)

@peterferrie
Copy link
Author

peterferrie commented Sep 1, 2022 via email

@tomcw
Copy link
Contributor

tomcw commented Sep 1, 2022

Closing as confirmed as fixed.

@tomcw tomcw closed this as completed Sep 1, 2022
tomcw added a commit that referenced this issue Sep 2, 2022
@tomcw
Copy link
Contributor

tomcw commented Sep 27, 2022

Officially fixed in this new AppleWin 1.30.12.0.

@Michaelangel007
Copy link
Contributor

@tomcw Thanks for fixing this off-by-one bug.

@peterferrie I've been using the : notation for decades. It should be inclusive as documented with the examples.

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

No branches or pull requests

3 participants