签到天数: 2130 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点# b- v& S& g* W4 `2 u7 n
Conditional Breakpoints
$ a0 W' f$ \) x2 J$ w2 J
) z E7 v( B$ G: MBreakpoints 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:# Z2 f4 \9 D% k# T5 O, ?( y+ |! D
( X; ?. a$ V) {4 H9 C& y7 ^( \
Connect -> Compare { ('||' | '&&') Compare } 6 G" u6 j* f! I0 @8 F+ W! S
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
9 t3 j4 |6 U ?" E7 a& r) KSum -> Product { ('+' | '-') Product } 2 `, f6 e! U# U1 `) H
Product -> Primitive { ('*' | '/') Primitive }
/ A2 c6 O/ l* f: @Primitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' q0 q* O9 G& l2 z" S! ?7 Y v
Number -> '#' [0123456789ABCDEF]*
( n2 w; D2 l9 z4 {* zAddress -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' . v( E/ R7 W8 }( n; a& r, }; U& x# S
Register -> 'A' | 'X' | 'Y' | 'P'
5 `$ _$ S7 S1 rFlag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V' m, {8 J0 L- Q1 Z4 u R
PC Bank -> 'K' . P3 v, `" h" o
Data Bank -> 'T' 9 l) @1 l4 Q, v% b- @( Y ?
: S- y% O/ j. A5 t
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.
% B, T4 v. m' ?* f0 }" r4 G) w: ~, A$ n8 Y( p
Registers A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.
7 U- ~6 M& e" U3 m' H- Q& L8 Z0 g0 t. [) K! N! g% y( w* Q3 D) G
Flags evaluate to 1 if set, 0 if clear.
& a" y) _; i* Q7 E& M& G
& X) K, p3 o. ?8 ?& v/ n& XConnecting operators || or && combine boolean terms. Parentheses dictate order of operations.
, O: }% T( P: z- u, r! N1 E, x$ C6 @. X7 }3 @; n. p) T: s
Example conditions:
3 A+ d2 _: Z8 H' E+ A2 _, m! w
) V2 @0 Q. a' R( y& QBreak only if register A is less than value at memory address $0005:
) O1 ]5 z( v; o! L+ {( m4 u; l% n ]* y& E2 S
A < $00053 W z8 D" M7 M
7 e' O, |; z3 I5 N4 V6 i6 yBreak only if the value at the indirect address is not equal to FF:' d' _. l0 u% d' N3 H
, c: U. \- f9 B8 s2 C5 C#FF != $[$10+($11*#100)]
3 |9 \* p3 \" M2 [% P
2 \; p- H! f) X3 Z5 S0 O* L; n. O( bBreak only if flag N is clear or A is not equal to 00:+ A, m# c6 Q3 Y6 q; R5 l
V" ]( O0 y- g; L2 D
(N==#0 || A!=#0)
( x0 b- O6 U5 K1 L( `) m
0 r! Z) {& t& V! O1 bBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
. ?3 }4 ~" ?& X& H6 Y! _& H1 H; W; ~% Y" Y
T==#2 ) D6 [" _& p; [: u8 ]- }# |+ p
( L# n1 i3 i& n$ m+ I
以上内容来自fceux自带的帮助文档说明 |
|