DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using SCODB

Breakpoints

Breakpoints are used to suspend execution when certain conditions are met.

Breakpoints are normally set in code, so that when a given instruction is reached, the breakpoint occurs and the debugger is called. The breakpoint occurs before the instruction is executed. These breakpoints are set by replacing the first byte of the instruction at the breakpoint address with an INT 3 instruction (0xCC), remembering the replaced byte. When a breakpoint occurs, the byte is restored so that the instruction can be executed.

Breakpoints can also be set such that the debugger will be invoked on a data reference. In this case, the breakpoint happens after the data reference. Data reference breakpoints are implemented using the processor's four debug registers, and may not be used when an ICE (In-Circuit Emulator) is in use on the system.

Commands may be given to the debugger to be executed when a breakpoint is encountered. If the debugger is in control after the breakpoint (in other words, the breakpoint commands did not call quit), the debugger displays the breakpoint value and name.

Use the breakpoint commands to set, list, and clear breakpoints:

   bc [*|<addr>|DR<n>|<name>]                      /* Breakpoint clear */
   bl [<name>]                                     /* Breakpoint list */
   bp [rw][b|s|l] [x] <address>                    /* Breakpoint set */
   bp [rw][b|s|l] <address> <condition> <value>    /* Breakpoint set */
   bp mod <address>                                /* Modify breakpoint commands */
   bp name <address>                               /* Breakpoint set with name */

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003