Oricutron memory access breakpoints
Oricutron memory access breakpoints
Just curious. I was trying to debug something for my game and ended up trying to set a breakpoint when a certain value changed.
I could not do it. First using bsm c address kept on giving me a "address expected" error, no matter what I put as an address (label, with or without the $ sign....). I only could do it when I issued a bsm address c, but then the breakpoint did not work. I press F2 and it did not get back to the debugger when the value changed.
What am I doing wrong?
I could not do it. First using bsm c address kept on giving me a "address expected" error, no matter what I put as an address (label, with or without the $ sign....). I only could do it when I issued a bsm address c, but then the breakpoint did not work. I press F2 and it did not get back to the debugger when the value changed.
What am I doing wrong?
-
- Squad Leader
- Posts: 774
- Joined: Sat May 21, 2011 7:21 pm
- Location: Between UK and France
- Contact:
Re: Oricutron memory access breakpoints
Had you tryed to enter hexa in caps ? (Beginnig with a $)
Ie
bs $B809
Ie
bs $B809
My Projects: Replic'Oric Project - StratoCumulus Project
Re: Oricutron memory access breakpoints
Yep. Still did not manage to make them work. Usual breakpoints (as the command you wrote) do work perfectly. Problem is with those that monitor memory accesses or changes (bsm commands).
-
- Squad Leader
- Posts: 774
- Joined: Sat May 21, 2011 7:21 pm
- Location: Between UK and France
- Contact:
Re: Oricutron memory access breakpoints
Have you tried with R or W flag? as "Change" is merely a Write, if W work it should be ok?
Hum the documentation have a problem
Not really consistent
So after looking in the code, the example at the end of the file is incorrect, it is bsm addr flag and the C flag seems to be correctly implemented by looking the source code..
If you display the breakpoint list is it inside?
Hum the documentation have a problem
Code: Select all
Commands:
[...]
bsm <addr> [rwc] - Set mem breakpoint
[...]
Breakpoints
===========
[...]
bsm r $0c00 <-- Break when the CPU is about to read from $0c00
bsm rw $0c00 <-- Break when the CPU is about to access $0c00
bsm c $0c00 <-- Break after then contents of $0c00 change
bsm rwc $0c00 <-- Break just before the CPU accesses $0c00, or just after it
changes for any reason.
So after looking in the code, the example at the end of the file is incorrect, it is bsm addr flag and the C flag seems to be correctly implemented by looking the source code..
If you display the breakpoint list is it inside?
My Projects: Replic'Oric Project - StratoCumulus Project
Re: Oricutron memory access breakpoints
Did not try to list breakpoints. It gives a breakpoint number and I can clear it. However memory changes and execution does not stop.... Maybe I am doing something wrong. Will do some more tests as soon as I can.Godzil wrote:So after looking in the code, the example at the end of the file is incorrect, it is bsm addr flag and the C flag seems to be correctly implemented by looking the source code..
If you display the breakpoint list is it inside?
-
- Squad Leader
- Posts: 774
- Joined: Sat May 21, 2011 7:21 pm
- Location: Between UK and France
- Contact:
Re: Oricutron memory access breakpoints
I confirm that it does not work even if the breakpoint are listed...
A simple way to replicated do is to
- press F2
- tape "bsm $B800 c"
- press F2 again
- tape POKE #B800, 12
- tape POKE #B800, 13
One of the two poke should trigger the breakpoint.. It does not.
This line https://code.google.com/p/oriculator/so ... itor.c#672 in the Oricutron source code seems suspicious
I can't build oricutron right now, but if someone can try to add between line 676 and 677 this code:
I think it will correct this problem.
A simple way to replicated do is to
- press F2
- tape "bsm $B800 c"
- press F2 again
- tape POKE #B800, 12
- tape POKE #B800, 13
One of the two poke should trigger the breakpoint.. It does not.
This line https://code.google.com/p/oriculator/so ... itor.c#672 in the Oricutron source code seems suspicious
I can't build oricutron right now, but if someone can try to add between line 676 and 677 this code:
Code: Select all
oric->cpu.anymbp = SDL_TRUE;
My Projects: Replic'Oric Project - StratoCumulus Project
Re: Oricutron memory access breakpoints
Its been a long time since I've looked at or used that code, so it could well be broken. I'm on it right now!
Re: Oricutron memory access breakpoints
Fixed in SVN. If you need a WIP build, let me know.
-
- Squad Leader
- Posts: 774
- Joined: Sat May 21, 2011 7:21 pm
- Location: Between UK and France
- Contact:
Re: Oricutron memory access breakpoints
Ho I just found and corrected the bug on my side and was going to send you a patch
My Projects: Replic'Oric Project - StratoCumulus Project
Re: Oricutron memory access breakpoints
ahh sorry! Thanks for your help, though. Contributions to oricutron are always welcome.
Re: Oricutron memory access breakpoints
Great to hear it has been solved! I managed to catch The bug myself, so no need for a WIP version just now. If I need it before the next release I will ask you for it.
Thanks!
Thanks!
Re: Oricutron memory access breakpoints
If everybody can confirm that the code works, I will update the osdk with the next version then.
-
- Squad Leader
- Posts: 774
- Joined: Sat May 21, 2011 7:21 pm
- Location: Between UK and France
- Contact:
Re: Oricutron memory access breakpoints
I confirm that it works
My Projects: Replic'Oric Project - StratoCumulus Project
Re: Oricutron memory access breakpoints
Eh, mmmm could I have a WIP version with the memory breakpoints corrected, please?
Re: Oricutron memory access breakpoints
@Chema: what OS are you using? I can provide Linux/Win 32/64 WIP builds (or VIP build for you:))