File: cmd_bp.html

package info (click to toggle)
sdcc 3.8.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 99,212 kB
  • sloc: ansic: 918,594; cpp: 69,526; makefile: 56,790; sh: 29,616; asm: 12,364; perl: 12,136; yacc: 7,179; lisp: 1,672; python: 812; lex: 773; awk: 495; sed: 89
file content (131 lines) | stat: -rw-r--r-- 5,301 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-2" http-equiv="content-type">
    <title>Breakpoints commands of &#181;Csim</title>
  </head>
  <body bgcolor="white">
    <!-- BREAKPOINTS -->
    <h2>Commands of <i>&#181;Csim</i> to manage breakpoints</h2>
    Two kind of breakpoint can be used: fetch and event
    breakpoint. <b>Fetch</b> breakpoints are classical breakpoints. They
    can be placed at any instruction in the code memory. Breakpoint will
    be hit if CPU fetches instruction code from the memory location
    specified by the breakpoint. Only fetching of first byte of the
    instruction hits the breakpoint. If the execution reaches a breakpoint
    it stops <i>before</i> the instruction at location specified by the
    breakpoint would be executed.
    <p><b>Event</b> breakpoints are special onces. 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 <i>after</i> specified event occurred.
    </p>
    <p>Every breakpoint can be <b>fix</b> (permanent) or <b>dynamic</b>
      (temporary). Dynamic breakpoints are automatically removed when they
      reached. Some commands place dynamic fetch breakpoints into the code,
      for example <a href="#g"><b>go</b></a> or <a href="#n"><b>next</b></a>.
    </p>
    <p>A <b>hit number</b> 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.
    </p>
    <hr>
    <a name="break">
      <h3>break <i>addr [hit]</i>
        <br>
        break <i>memory_type r|w addr [hit]</i></h3>
    </a>
    <a name="tbreak">
      <h3>tbreak<i> addr [hit]</i>
        <br>
        tbreak <i>memory_type r|w addr [hit]</i></h3>
    </a>
    Set fetch or event breakpoint. The command specifies if the breakpoint
    will be fix (<b>break</b>) or dynamic (temporary)
    (<b>tbreak</b>).
    <p>Fetch or event breakpoint can be defined. First form defines fetch
      while second form defines event breakpoint.
    </p>
    <dl>
      <dt>Fetch breakpoint
      </dt>
      <dd>First parameter specifies address where the breakpoint must be
        placed to. It should be address of an instruction.
        <br>
        Second parameter is optional and it specifies the hit number. It is
        1 by default.
      </dd>
      <dt>Event breakpoint
      </dt>
      <dd>First parameter specifies class name of memory where we are going
        to watch for en event. Class names of memories can be checked by <a href="cmd_general.html#info_memory">info
          memory</a> command.
        <br>
        Second parameter specifies the event. It can be <b>r</b> to
        specify <b>read</b> operation or <b>w</b> which means <b>write</b>
        operation.
        <br>
        Remaining parameters are address of watched memory location and an
        optional hit number (1 by default).
      </dd>
    </dl>
    <pre>$ <font color="#118811">s51 remoansi.hex</font>
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
&gt; <font color="#118811">dc 0 0x10</font>
   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
&gt; <font color="#118811">break 0x160</font>
Breakpoint 1 at 0x000160: CLR   P1.0
&gt; <font color="#118811">tbreak 8 2</font>
Breakpoint 2 at 0x000008: MOV   R7,A
&gt; <font color="#118811">g</font>
Simulation started, PC=0x000000
Stop at 000160: (4) Breakpoint
F 000160
&gt; </pre>
    <hr>
    <a name="clear">
      <h3>clear <i>[addr...]</i></h3>
    </a>
    Delete fetch breakpoint. Parameter specifies address of breakpoint. If
    there is no breakpoint specified at given address this command prints
    out a warning message.
    <p>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.
    </p>
    <pre>&gt; <font color="#118811">i b</font>
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
&gt; <font color="#118811">clear 160</font>
No breakpoint at 0000a0
&gt; <font color="#118811">clear 0x160</font>
&gt; <font color="#118811">i b</font>
Num Type       Disp Hit   Cnt   Address  What
2   fetch      del  1     1     0x000180 LJMP  022a
1   event      keep 1     1     0x000006 wi
&gt; </pre>
    <hr>
    <a name="delete">
      <h3>delete <i>[number...]</i></h3>
    </a>
    Delete breakpoint(s) by its number.
    <p>If parameter is not used then all breakpoints are deleted.
    </p>
    <hr>
  </body>
</html>