3 <title>Breakpoints commands of µCsim</title>
10 <h2>Commands of µCsim to manage breakpoints</h2>
12 Two kind of breakpoint can be used: fetch and event
13 breakpoint. <B>Fetch</b> breakpoints are classical breakpoints. They
14 can be placed at any instruction in the code memory. Breakpoint will
15 be hit if CPU fetches instruction code from the memory location
16 specified by the breakpoint. Only fetching of first byte of the
17 instruction hits the breakpoint. If the execution reaches a breakpoint
18 it stops <i>before</i> the instruction at location specified by the
19 breakpoint would be executed.
21 <p><b>Event</b> breakpoints are special onces. They cause stop of
22 execution if event specified by the breakpoint occures. Event can be a
23 read or a write operation on any address space location. Event
24 breakpoint stops execution <i>after</i> specified event occured.
26 <p>Every breakpoint can be <b>fix</b> (permanent) or <b>dynamic</b>
27 (temporary). Dynamic breakpoints are automatically removed when they
28 reached. Some commands place dynamic fetch breakpoints into the code,
29 for example <a href="#g"><b>go</b></a> or <a
30 href="#n"><b>next</b></a>.
32 <p>A <b>hit number</b> can be associated to any breakpoint. This hit
33 number specifies how many times the breakpoint must be hit before it
34 causes the execution to stop. This hit number is 1 by default.
39 <a name="break"><h3>break <i>addr [hit]</i>
40 <br>break <i>memory_type r|w addr [hit]</i></h3></a>
41 <a name="tbreak"><h3>tbreak<i> addr [hit]</i>
42 <br>tbreak <i>memory_type r|w addr [hit]</i></h3></a>
45 Set fetch or event breakpoint. The command specifies if the breakpoint
46 will be fix (<b>break</b>) or dynamic (temporary)
49 <p>Fetch or event breakpoint can be defined. First form defines fetch
50 while second form defines event breakpoint.
52 <dl><dt>Fetch breakpoint
54 <dd>First parameter specifies address where the breakpoint must be
55 placed to. It should be address of an instruction.
56 <br>Second parameter is optional and it specifies the hit number. It is
61 <dd>First parameter specifies class name of memory where we are going
62 to watch for en event. Class names of memories can be checked by <a
63 href="cmd_general.html#info_memory">info memory</a> command.
64 <br>Second parameter specifies the event. It can be <b>r</b> to
65 specify <b>read</b> operation or <b>w</b> which means <b>write</b>
67 <br>Remaining parameters are address of watched memory location and an
68 optional hit number (1 by default).
73 $ <font color="#118811">s51 remoansi.hex</font>
74 ucsim 0.2.24, Copyright (C) 1997 Daniel Drotos, Talker Bt.
75 ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
76 This is free software, and you are welcome to redistribute it
77 under certain conditions; type `show c' for details.
78 58659 bytes read from remoansi.hex
79 > <font color="#118811">dc 0 0x10</font>
80 000000 02 01 60 LJMP 0160
81 * 000003 02 00 3c LJMP 003c
87 * 00000b 02 3b e0 LJMP 3be0
91 > <font color="#118811">break 0x160</font>
92 Breakpoint 1 at 0x000160: CLR P1.0
93 > <font color="#118811">tbreak 8 2</font>
94 Breakpoint 2 at 0x000008: MOV R7,A
95 > <font color="#118811">g</font>
96 Simulation started, PC=0x000000
97 Stop at 000160: (4) Breakpoint
104 <a name="clear"><h3>clear <i>[addr...]</i></h3></a>
106 Delete fetch breakpoint. Parameter specifies address of breakpoint. If
107 there is no breakpoint specified at given address this command prints
108 out a warning message.
110 <p>If parameter is not given then breakpoint at current PC will be
111 deleted if it exists. If more than one address is specified then all
112 breakpoints at specified addresses will be deleted.
115 > <font color="#118811">i b</font>
116 Num Type Disp Hit Cnt Address What
117 1 fetch keep 1 1 0x000160 CLR P1.0
118 2 fetch del 1 1 0x000180 LJMP 022a
119 1 event keep 1 1 0x000006 wi
120 > <font color="#118811">clear 160</font>
121 No breakpoint at 0000a0
122 > <font color="#118811">clear 0x160</font>
123 > <font color="#118811">i b</font>
124 Num Type Disp Hit Cnt Address What
125 2 fetch del 1 1 0x000180 LJMP 022a
126 1 event keep 1 1 0x000006 wi
132 <a name="delete"><h3>delete <i>[number...]</i></h3></a>
134 Delete breakpoint(s) by its number.
136 <p>If parameter is not used then all breakpoints are deleted.