签到天数: 2153 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点" ]( M; N6 A3 m+ ]# b
Conditional Breakpoints; T: e! e. T, k
% T* H! N7 {" a |/ E1 D% z6 r
Breakpoints may also have a conditional statement that causes them to execute only if that statement evaluates to true. The conditional breakpoint grammar has this form: H0 _, m. q5 m2 y- _0 X5 B
; [$ [: f1 H0 Y
Connect -> Compare { ('||' | '&&') Compare } . p( M9 F, C1 s0 d; l- U. q
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
/ x( F: q) D# B/ S; r; U* t( N1 zSum -> Product { ('+' | '-') Product } , B7 T1 o2 q4 ?2 \
Product -> Primitive { ('*' | '/') Primitive }
5 C' m" |; \- r/ N) F, }! D& yPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
1 b% ?% V+ u- V8 oNumber -> '#' [0123456789ABCDEF]* ( _. z+ A6 v3 }
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
- [% A9 a0 u- I0 IRegister -> 'A' | 'X' | 'Y' | 'P'
! l) o& a. @3 R0 u8 n/ P" EFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' # `0 ]) D% h1 ]4 s# T
PC Bank -> 'K'
- G u: {5 f5 R7 l0 R5 U& |0 ?" UData Bank -> 'T'
9 I! J; p" n9 L0 \7 i" G
, \5 z! z1 i' o# C* a0 y) N* M3 @The parser is very strict. All numbers are hexadecimal. Always prefix a number with # for an immediate value, or $ for a memory address. If a memory address needs to be calculated use $[] with the calculation inside the brackets.8 P, ]) V& p; `& a9 @. N
. @2 Q z# \3 w7 s. cRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
6 J7 I$ D/ ?2 @3 y( |- ^% K9 ~! X, M& D& r7 d5 Q6 r, A
Flags evaluate to 1 if set, 0 if clear.
1 D6 c" k- v6 v1 U& j9 Q, x z! [# j5 s" v7 S- c
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.4 U/ ~6 c- j4 v/ k0 _
) `. I8 ^- V& H! D G M. X: K" i; f6 b
Example conditions:
. c2 r6 [, a% h- t9 x! C6 O) p+ k5 k2 G7 U9 ~. Q& C
Break only if register A is less than value at memory address $0005:9 a7 W5 k6 s* r( ^
( u2 l% a+ O5 I4 Q: U
A < $0005
3 t, i" i4 K* x2 c$ o% W) C% L
' G- d$ s& |9 N) QBreak only if the value at the indirect address is not equal to FF:
: A3 J3 M. U/ ^5 d2 w# d. Y
) O7 J* ~" _* W/ x#FF != $[$10+($11*#100)]4 l/ F* _2 X! z5 \- K' y
$ ]" m( I" X% z! U
Break only if flag N is clear or A is not equal to 00:
" l$ y$ e7 O: Q3 i/ b4 _$ g5 N4 `6 x* L! |
(N==#0 || A!=#0)- @1 b& x6 F. ^! U
6 L2 I/ P: O+ ~4 L3 b7 ~4 u0 u
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):- F }; w! @2 S( Z# |
1 E% A& Q$ K# L6 k1 _. b7 ZT==#2
; j' G* |1 f" Q) S/ v* u, J7 ] H3 `' B" H! o# z p% S" O
以上内容来自fceux自带的帮助文档说明 |
|