![]() |
![]() |
![]() |
#1 |
German Translator
![]() Join Date: Aug 2018
Location: Drübeck / Germany
Age: 48
Posts: 92
|
conditional register breakpoint
How is this conditional register breakpoint really works?
fo <num> <reg> <oper> <val> [<mask> <val2>] Conditional register breakpoint. reg=Dx,Ax,PC,USP,ISP,VBR,SR. oper:!=,==,<,>,>=,<=,-,!- (-=val to val2 range). Code:
>fo 0 A0==$21000 Breakpoint added. >fl 0: A0 == 00021000 [ffffffff 00000000] > ok, that works. but how is the function of the two 32Bit values in the square brackets? Is it in a range? Or can I also break the program with a masked bit like: Code:
>fo 0 d0==$00000004 $00000004 Breakpoint added. >fl 0: D0 == 00000004 [00000004 00000000] or >fo 0 d0==$00000004 $00000004 $00000004 Breakpoint added. >fl 0: D0 == 00000004 [00000004 00000004] for move.w #$0004,d0 00c25956 303c 0004 move.w #$0004,d0 Next PC: 00c2595a >t Cycles: 4 Chip, 8 CPU. (V=210 H=66 -> V=210 H=70) D0 00000004 D1 00000000 D2 00000000 D3 00000000 Code:
>fd All breakpoints removed. >fo 0 d0==$00000004 Breakpoint added. >fl 0: D0 == 00000004 [ffffffff 00000004] |
![]() |
![]() |
#2 |
German Translator
![]() Join Date: Aug 2018
Location: Drübeck / Germany
Age: 48
Posts: 92
|
I made a mistake. A breakpoint 0 triggered isn't shown with singlesteps.
I believe the formula for "fo <num> <reg> <oper> <val> [<mask> <val2>]" is: Code:
f0 0 (reg.l & mask.l) == val2.l eg. fo 0 d0==$8000 $ff00 $8000 >fl 0: D0 == 00008000 [0000ff00 00008000] or >fo 0 d0==$11008000 $ff00 $8000 >fl 0: D0 == 11008000 [0000ff00 00008000] move.l #$11008000,d0 ; Breakpoint 0 triggered. move.l #$00008000,d0 ; Breakpoint 0 triggered. move.l #$00004010,d0 ; no breakpoint move.l #$0000F011,d0 ; Breakpoint 0 triggered. (I made only short tests.) |
![]() |
![]() |
#3 |
German Translator
![]() Join Date: Aug 2018
Location: Drübeck / Germany
Age: 48
Posts: 92
|
I checked again the fo-command and the result is, that the parameter 'val2' has no function.
I only checked with '=='. Code:
1. if (reg & mask) == val1 ; ok >fo 0 d0==$8 Breakpoint added. >fl 0: D0 == 00000008 [ffffffff 00000000] ; Breakpoint only for certain value 2. if (reg & mask) == val1 ; ok >fo 0 d0==$13700 $000fff00 $00000000 Breakpoint added. >fl 0: D0 == 00013700 [000fff00 00000000] ; Breakpoint for value on specific bits >fo 0 d0==$13700 $0 $0 ; ok Breakpoint added. >fl 0: D0 == 00013700 [00000000 00000000] ; Breakpoint every time 3. >fo 0 d0==$13700 $ffffffff $10 Breakpoint added. >fl 0: D0 == 00013700 [ffffffff 00000010] ; I can not see any influence of the second parameter 'val2' I suggest to look into this and maybe change to: if (((reg & mask) >= (val1-val2)) && ((reg & mask) <= (val1+val2))) or if (((reg & mask) >= (val1)) && ((reg & mask) <= (val1+val2))) Then the parameter 'val2' would specify a range. The possible operations seems to be to much: oper: !=,==,<,>,>=,<=,-,!- Maybe better would be only '==' or the oposite '!=' for inside or outside a range or value. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Conditional JSR and RTS | DanScott | Coders. Asm / Hardware | 9 | 15 January 2021 03:56 |
nOOb needing help to understand Conditional Branching | KONEY | Coders. Asm / Hardware | 2 | 26 October 2019 00:42 |
conditional breakpoints | jotd | request.UAE Wishlist | 2 | 12 June 2016 20:36 |
Noobie Help (conditional branching) | bodhi | Coders. Asm / Hardware | 7 | 03 January 2013 01:55 |
|
|