DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Using SCODB on SCO OpenServer 5

Setting breakpoints

Use bp to set breakpoints and modify the commands associated with a breakpoint. For code breakpoints, the simple form:

   bp address
is used to set a breakpoint at address, unless address is in ROM, in which case the data breakpoint form must be used:
   bp x address
See ``Breakpoint addresses''.

When setting data reference breakpoints, call bp with arguments that specify read (r) and/or write (w) references of a byte (b), short (s), or long (l). For example, to trap on references to write a long at F00F072C:

   debug0:7> bp wl F00F072C
This causes all accesses to location F00F072C to cause an entry into the debugger. If desired, data breakpoints can be set up to only break when the location is written with a certain value:
   debug0:7> bp wl &lbolt == 1200
This causes an entry into the debugger when lbolt is written with the value 1200. In this case, the command syntax additionally specifies a condition (==) and a value (1200). The full set of conditions that can be specified are:

== equal
!= not equal
>= greater than or equal
<= less than or equal
& logical-and

The ``logical-and'' condition evaluates true when the location AND-ed with the value is non-zero. The value specified can be any SCODB expression; its value is only calculated once.

If the name argument is used to set a breakpoint (for example: bp name read+1), the debugger prompts for a descriptive name to associate with the breakpoint. This name can be used as an alternative way to reference the breakpoint by preceeding the name with a hash (for example bc #testpoint). The name can be up to 31 characters long. The default action is not to prompt for this name, but to use in its place the expression that the user typed to specify the breakpoint address. When the bp name form is used on a breakpoint that already exists, it changes only the name of the breakpoint.

Specify the mod argument to make bp prompt for commands to execute when the breakpoint occurs. These commands are entered in an editing mode very similar to either vi or emacs. In vi mode, enter <Esc>Q to stop entering commands. Note that the editing mode is entered in insert mode, and empty lines are automatically deleted. These commands are normal debugger commands, and are executed sequentially until there are no more commands or a quit command occurs:

   debug0:8> bp mod read
   Enter commands to execute at breakpoint:
   [1] quitif ++$x != 4
   [2] r
   [3] <Esc>:
   :q
The above example, assuming that $x is initialized as 0, causes the first three breakpoints at read to go by unnoticed, while the fourth will print the register contents and drop into the debugger. These commands can be later modified by using the mod argument to bp in exactly the same way.
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005