签到天数: 1836 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
8 Q, P: r& F, ]4 w; v( sConditional Breakpoints7 A( h! r r( ~, N
% X! F+ I! s. \3 e1 x$ fBreakpoints 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:
K5 Q" C: e6 D+ x% \9 Y. f) e
7 P' |1 ~- U8 Y3 f b0 v' uConnect -> Compare { ('||' | '&&') Compare }
9 G9 h* U5 Q6 ]# z) _1 ~Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum } F* `" B% W5 E' p- {& @7 E
Sum -> Product { ('+' | '-') Product }
! @* w. N0 ~7 \% V9 V* M% Y$ u* P. dProduct -> Primitive { ('*' | '/') Primitive } 2 D) O3 L, ^$ z! \/ `
Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')'
6 l# C" P! Z/ N" c' v9 `# XNumber -> '#' [0123456789ABCDEF]* 8 W7 C9 M: ^ G$ R: U
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']'
, }0 I/ u1 P$ S2 X0 ^/ xRegister -> 'A' | 'X' | 'Y' | 'P'
6 Q3 O7 d$ d1 P- f. \Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' 0 c3 ^+ q4 M$ a
PC Bank -> 'K' / K3 ~" m# U/ H' O) T- ^- [+ r5 n: j
Data Bank -> 'T' 2 t0 w9 q" S. J+ O% {
6 ?! R- p* a0 ^5 f9 QThe 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.
! n2 t) x n7 k. `5 {4 x/ i2 m1 Z/ A: R8 v) M( g5 I& J8 g5 E# K
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.% ]) V# R( L/ g
. a2 t6 N9 _3 o& b$ C5 n/ U. nFlags evaluate to 1 if set, 0 if clear.
- k) k+ N0 ?3 T* T7 @! Y9 I& h/ ~
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.
/ A }& i# y, n3 b. P( F$ \8 u( m* X" }
Example conditions:
- D0 |. y% f$ }! C& _+ t' K6 q4 E/ i8 }4 B2 B
Break only if register A is less than value at memory address $0005:" K, D( t% E7 f3 d! L
a- U+ |: T6 r, ~. Y; j! s
A < $0005
8 V3 w& A F* m1 N2 E& Q$ N4 p* t3 ~
Break only if the value at the indirect address is not equal to FF:
' B& P1 T& C9 z' f! I# V" ^
/ g. M) J, @; J, p) }) D0 v: y#FF != $[$10+($11*#100)]) F5 y) F& F) k# E* C# V
7 G. m6 o" s8 l7 oBreak only if flag N is clear or A is not equal to 00:" ~: H( v1 M5 s l) L
6 d, a. A! k( D9 L# ^
(N==#0 || A!=#0)1 x$ X2 O. M; B j5 P$ h0 i7 H
# T9 v1 ^+ `' k$ v$ m, f' ^
Break only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):& S6 _. O8 N- ^' g
S4 G/ c+ w) y NT==#2
* Q* o$ `: S- c7 ?& G# Q) @5 V" B" _3 S6 e! I; S" _! l
以上内容来自fceux自带的帮助文档说明 |
|