Event breakpoints are special onces. They cause stop of execution if event specified by the breakpoint occures. Events are:
Every breakpoint can be fix (permanent) or dynamic (temporary). Dynamic breakpoints are automatically removed when they reached. Some commands place dynamic fetch breakpoints into the code, for example go or next.
A hit number can be associated to any breakpoint. This hit
number specifies how many times the breakpoint must be hit before it
causes the execution to stop. This hit number is 1 by default.
break addr [hit]
tbreak addr [hit]
Set fetch breakpoint. The command specifies if the breakpoint will be
fix (break) or dynamic (temporary) (tbreak). First
parameter specifies address where the breakpoint must be placed to. It
should be address of an instruction.
Second parameter is optional and it specifies the hit number. It is 1 by default.
$ s51 remoansi.hex ucsim 0.2.24, Copyright (C) 1997 Daniel Drotos, Talker Bt. ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. 58659 bytes read from remoansi.hex > dc 0 0x10 000000 02 01 60 LJMP 0160 * 000003 02 00 3c LJMP 003c * 000006 ff MOV R7,A * 000007 ff MOV R7,A * 000008 ff MOV R7,A * 000009 ff MOV R7,A * 00000a ff MOV R7,A * 00000b 02 3b e0 LJMP 3be0 * 00000e ff MOV R7,A * 00000f ff MOV R7,A * 000010 ff MOV R7,A > break 0x160 Breakpoint 1 at 0x000160: CLR P1.0 > tbreak 8 2 Breakpoint 2 at 0x000008: MOV R7,A > g Simulation started, PC=0x000000 Stop at 000160: (4) Breakpoint F 000160 >
Forth parameter is optional and it specifies the hit number. It is 1 by default.
$ s51 remoansi.hex ucsim 0.2.12, Copyright (C) 1997 Daniel Drotos, Talker Bt. ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. 58659 bytes read from remoansi.hex > dis 00d47e 22 RET 000000 02 01 60 LJMP 0160 000160 c2 90 CLR P1.0 000162 c2 97 CLR P1.7 000164 d2 b5 SETB P3.5 000166 d2 b4 SETB P3.4 000168 75 81 22 MOV SP,#22 00016b 75 d0 00 MOV PSW,#00 00016e 7e 00 MOV R6,#00 000170 7f 00 MOV R7,#00 000172 79 04 MOV R1,#04 000174 12 0d b8 LCALL 0db8 000177 0f INC R7 000178 d9 fa DJNZ R1,0174 00017a 75 0b 00 MOV 0b,#00 00017d 75 0c 00 MOV 0c,#00 000180 02 02 2a LJMP 022a 000183 78 22 MOV R0,#22 000185 76 00 MOV @R0,#00 000187 d8 fc DJNZ R0,0185 > bse wi f 6 > g 4 000170 7f 00 MOV R7,#00 >
If parameter is not given then breakpoint at current PC will be deleted if it exists. If more than one address is specified then all breakpoints at specified addresses will be deleted.
> i b Num Type Disp Hit Cnt Address What 1 fetch keep 1 1 0x000160 CLR P1.0 2 fetch del 1 1 0x000180 LJMP 022a 1 event keep 1 1 0x000006 wi > clear 160 No breakpoint at 0000a0 > clear 0x160 > i b Num Type Disp Hit Cnt Address What 2 fetch del 1 1 0x000180 LJMP 022a 1 event keep 1 1 0x000006 wi >
> bl D 2(2) 000180 02 LJMP 022a F 1(1) 000006 wi > bde ri 6 No ri breakpoint at 000006 > bde wi 6 > bl D 2(2) 000180 02 LJMP 022a >
> bl F 1(1) 000160 c2 CLR P1.0 D 2(2) 000180 02 LJMP 022a F 1(1) 000006 wi > ba > bl >