签到天数: 2047 天 [LV.Master]伴坛终老
|
发表于 2014-1-24 16:59:47
|
显示全部楼层
回3楼:其他条件断点
& g2 b/ Y, z8 A# j8 L0 xConditional Breakpoints# X+ z% G0 t2 L
3 q3 w; b; N2 B8 w. SBreakpoints 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:" }& ?& g" Z7 e
" A4 Y, z% @" G+ T/ JConnect -> Compare { ('||' | '&&') Compare } : L1 d4 [" D, U ~$ ^5 v
Compare -> Sum { ('==' | '!=' | '<=' | '>=' | '<' | '>') Sum }
7 Z A4 r1 E1 g: USum -> Product { ('+' | '-') Product } + h& \0 G, V, S9 F: z* W
Product -> Primitive { ('*' | '/') Primitive }
& O. U6 A4 f9 HPrimitive -> Number | Address | Register | Flag | PC Bank | Data Bank | '(' Connect ')' 9 I( X4 h7 \7 ^& G/ p* D* D, r
Number -> '#' [0123456789ABCDEF]* " A% l# A, h$ n) Z% d8 N# a
Address -> '$' [0123456789ABCDEF]* | '$' '[' Connect ']' # E2 n) {# t1 ~) i
Register -> 'A' | 'X' | 'Y' | 'P'
" H5 `9 _6 G$ D- ]Flag -> 'N' | 'C' | 'Z' | 'I' | 'B' | 'V'
* C6 z% B% W# ^1 `5 r+ {PC Bank -> 'K'
) X4 A# ^2 S7 V& sData Bank -> 'T'
5 I8 F$ _- w. E* v( g& c
+ T' e5 U8 Q, _5 hThe 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! G* T' P
; t3 b% ^" m( o0 Z* Q& f( h) P) SRegisters A/X/Y are 8-bit unsigned values. Register P is the 16-bit program counter.- Q* u, |, E5 d5 K S$ O: T- A
n/ q! R9 a; n- {1 y6 w
Flags evaluate to 1 if set, 0 if clear.- U# l8 |6 L6 A& b$ ^8 H5 b
6 d* U3 ^6 E# o5 S( ^" B3 h
Connecting operators || or && combine boolean terms. Parentheses dictate order of operations.$ P9 E i Z- q- i* h
# ?0 p4 ]4 a, u o9 K
Example conditions:0 B; j* O( U. \$ {
" w/ E) }. t6 u( Z% c6 A8 YBreak only if register A is less than value at memory address $0005:0 a- Q$ A5 \! ?7 s2 H8 {+ t
0 O4 G& W8 ]/ P% ~
A < $00050 e4 Q% k$ B9 l4 h! b) h' Q
: c' m0 j# @' G0 F# U
Break only if the value at the indirect address is not equal to FF:
/ H- p4 Z# ?$ I, _( t8 J' N4 {3 z5 t4 b6 X# D* a6 j2 B- h
#FF != $[$10+($11*#100)]" {. e9 u! R# F. D/ S8 o
; \6 G8 f3 t3 i& \; C; d6 fBreak only if flag N is clear or A is not equal to 00:" }2 I" C5 @/ S$ S( R# d9 H
0 ?5 ^( k$ ]. G9 y* u8 ^(N==#0 || A!=#0)
' ~% {- {$ |/ N+ E* k; F
; M4 q0 C) D& t& Y7 o+ V, zBreak only when accessing a data from bank 2 (the condiition is relevant when using with Read/Write-type breakpoints):
- Z$ \5 Y* y$ l, n( U- k" G& L& z* ~: f9 z2 C+ q
T==#2 9 n& ?5 L; `4 F4 n! K5 X P
! I1 X Y/ I$ J
以上内容来自fceux自带的帮助文档说明 |
|