?login_element?

Subversion Repositories NedoOS

Rev

Blame | Last modification | View Log | Download

  1. <html>
  2.   <head>
  3.     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-2">
  4.     <title>Breakpoints commands of &mu;Csim</title>
  5.   </head>
  6.   <body style=" background-color: white;">
  7.     <!-- BREAKPOINTS -->
  8.     <h2>Commands of <i>&mu;Csim</i> to manage breakpoints</h2>
  9.     Two kind of breakpoint can be used: fetch and event breakpoint. <b>Fetch</b>
  10.     breakpoints are classical breakpoints. They can be placed at any instruction
  11.     in the code memory. Breakpoint will be hit if CPU fetches instruction code
  12.     from the memory location specified by the breakpoint. Only fetching of first
  13.     byte of the instruction hits the breakpoint. If the execution reaches a
  14.     breakpoint it stops <i>before</i> the instruction at location specified by
  15.     the breakpoint would be executed.
  16.     <p><b>Event</b> breakpoints are special onces. They cause stop of execution
  17.       if event specified by the breakpoint occurs. Event can be a read or a
  18.       write operation on any address space location. Event breakpoint stops
  19.       execution <i>after</i> specified event occurred. </p>
  20.     <p>Every breakpoint can be <b>fix</b> (permanent) or <b>dynamic</b>
  21.       (temporary). Dynamic breakpoints are automatically removed when they
  22.       reached. Some commands place dynamic fetch breakpoints into the code, for
  23.       example <a href="#g"><b>go</b></a> or <a href="#n"><b>next</b></a>. </p>
  24.     <p>A <b>hit number</b> can be associated to any breakpoint. This hit number
  25.       specifies how many times the breakpoint must be hit before it causes the
  26.       execution to stop. This hit number is 1 by default. </p>
  27.     <hr> <a name="break">
  28.       <h3>break <i>addr [hit] [if expression]</i> <br>
  29.         break <i>memory_type r|w addr [hit] [if expression]<br>
  30.         </i></h3>
  31.     </a> <a name="tbreak">
  32.       <h3>tbreak<i> addr [hit] [if expression]</i> <br>
  33.         tbreak <i>memory_type r|w addr [hit] [if expression]<br>
  34.         </i></h3>
  35.     </a> Set fetch or event breakpoint. The command specifies if the breakpoint
  36.     will be fix (<b>break</b>) or dynamic (temporary) (<b>tbreak</b>).
  37.     <p>Fetch or event breakpoint can be defined. First form defines fetch while
  38.       second form defines event breakpoint. </p>
  39.     <dl>
  40.       <dt>Fetch breakpoint </dt>
  41.       <dd>First parameter specifies address where the breakpoint must be placed
  42.         to. It should be address of an instruction. <br>
  43.         Second parameter is optional and it specifies the hit number. It is 1 by
  44.         default. </dd>
  45.       <dt>Event breakpoint </dt>
  46.       <dd>First parameter specifies class name of memory where we are going to
  47.         watch for en event. Class names of memories can be checked by <a href="cmd_general.html#info_memory">info
  48.           memory</a> command. <br>
  49.         Second parameter specifies the event. It can be <b>r</b> to specify <b>read</b>
  50.         operation or <b>w</b> which means <b>write</b> operation. <br>
  51.         Remaining parameters are address of watched memory location and an
  52.         optional hit number (1 by default). </dd>
  53.     </dl>
  54.     <pre>$ <font color="#118811">s51 remoansi.hex</font>
  55. ucsim 0.2.24, Copyright (C) 1997 Daniel Drotos, Talker Bt.
  56. ucsim comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  57. This is free software, and you are welcome to redistribute it
  58. under certain conditions; type `show c' for details.
  59. 58659 bytes read from remoansi.hex
  60. &gt; <font color="#118811">dc 0 0x10</font>
  61.    000000 02 01 60 LJMP  0160
  62.  * 000003 02 00 3c LJMP  003c
  63.  * 000006 ff       MOV   R7,A
  64.  * 000007 ff       MOV   R7,A
  65.  * 000008 ff       MOV   R7,A
  66.  * 000009 ff       MOV   R7,A
  67.  * 00000a ff       MOV   R7,A
  68.  * 00000b 02 3b e0 LJMP  3be0
  69.  * 00000e ff       MOV   R7,A
  70.  * 00000f ff       MOV   R7,A
  71.  * 000010 ff       MOV   R7,A
  72. &gt; <font color="#118811">break 0x160</font>
  73. Breakpoint 1 at 0x000160: CLR   P1.0
  74. &gt; <font color="#118811">tbreak 8 2</font>
  75. Breakpoint 2 at 0x000008: MOV   R7,A
  76. &gt; <font color="#118811">g</font>
  77. Simulation started, PC=0x000000
  78. Stop at 000160: (4) Breakpoint
  79. F 000160
  80. &gt; </pre>
  81.     <hr> <a name="clear">
  82.       <h3>clear <i>[addr...]</i></h3>
  83.     </a> Delete fetch breakpoint. Parameter specifies address of breakpoint. If
  84.     there is no breakpoint specified at given address this command prints out a
  85.     warning message.
  86.     <p>If parameter is not given then breakpoint at current PC will be deleted
  87.       if it exists. If more than one address is specified then all breakpoints
  88.       at specified addresses will be deleted. </p>
  89.     <pre>&gt; <font color="#118811">i b</font>
  90. Num Type       Disp Hit   Cnt   Address  What
  91. 1   fetch      keep 1     1     0x000160 CLR   P1.0
  92. 2   fetch      del  1     1     0x000180 LJMP  022a
  93. 1   event      keep 1     1     0x000006 wi
  94. &gt; <font color="#118811">clear 160</font>
  95. No breakpoint at 0000a0
  96. &gt; <font color="#118811">clear 0x160</font>
  97. &gt; <font color="#118811">i b</font>
  98. Num Type       Disp Hit   Cnt   Address  What
  99. 2   fetch      del  1     1     0x000180 LJMP  022a
  100. 1   event      keep 1     1     0x000006 wi
  101. &gt; </pre>
  102.     <hr> <a name="delete">
  103.       <h3>delete <i>[number...]</i></h3>
  104.     </a> Delete breakpoint(s) by its number.
  105.     <p>If parameter is not used then all breakpoints are deleted. </p>
  106.     <hr> <a name="commands">
  107.       <h3>commands <i>script</i></h3>
  108.     </a>
  109.     <p> </p>
  110.     <hr>
  111.   </body>
  112. </html>
  113.