Event breakpoints are special ones. They cause stop of execution if event specified by the breakpoint occurs. Event can be a read or a write operation on any address space location. Event breakpoint stops execution after specified event occurred.
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.
Fetch or event breakpoint can be defined. First form defines fetch while second form defines event breakpoint.
$ ucsim_51 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 >Breakpoint hits can be made more noticeable by printing a beep character on the console. This function can be turned on by setting the option beep_break (FALSE by default).
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 >
If parameter is not used then all breakpoints are deleted.
Attach a script to a breakpoint. Breakpoint number can be omitted if only one breakpoint exists. Breakpoint numbers can be checked by info breakpoint command. Script is command or a list of commands separated by ; character. It will be executed when the specified breakpoint is accepted. Whether the text of the script is printed before execution is controlled by the option echo_script, which is FALSE by default. See set option command how to set it. If script is not used, breakpoint command will be deleted from the specified breakpoint.
/format option can be used to specify print format for the expression. For meaning of the options, see expression command.
If no expr argument is given, all defined expressions are listed and evaluated and values are printed.
0> disp R7 0> disp ACC 0> b 0x10 Breakpoint 1 at 0x000010 (cond="") 0x0010 F? ff MOV R7,A 0> display 1: R7 = 107 2: ACC = 0 0> run Simulation started, PC=0x000000 Stop at 0x000010: (104) Breakpoint R0 R1 R2 R3 R4 R5 R6 R7 41 58 fc c9 8b bc 95 00 @R0 76 v ACC= 0x00 0 . B= 0x00 @R1 73 s PSW= 0x00 CY=0 AC=0 OV=0 P=0 SP 0x07 -> 00 95 bc 8b c9 fc 58 41 DPTR= 0x0000 @DPTR= 0x83 131 . 0x0010 F ff MOV R7,A F 0x000010 Simulated 192 ticks (1.736e-05 sec) Host usage: 0.007306 sec, rate=0.002376 1: R7 = 0 2: ACC = 0 0>