|
|
SCODB is included as an unconfigured pseudo-device driver in the SCO OpenServer kernel. To activate it:
The value used to invoke kernel-level SCODB is controlled by the DBKEY tunable parameter. This can be set to any key that is not commonly used for other purposes; see ``Modifying tunable parameters''.
Kernel-level SCODB can be run from other types of displays. See ``Setting up the display unit''.
The user-level scodb(ADM) command can be run without configuring the scodb driver into the kernel, but some additional setup steps are required. See ``Structure/union and variable definition files'' for information.
debugn:m>
The prompt for the user-level scodb(ADM) command is:
scodbm>
SCODB has a history mechanism similar to that of ksh(C). Entering <Esc> puts the current input line into edit mode, where either vi- or emacs-style editing can be used. The vi and emacs modes have separate history files, so if you toggle between the two edit modes, the command history is not shared.
Note that the number of history lines remembered is a limited configurable parameter, and that the ``undo'' facility is quite limited.
Use the quit (q) or quitif command to exit SCODB:
q [address] /* Quit debugger */ quitif expression /* If (expression) then quit */The debugger is exited by using q. If address is given, execution resumes there, otherwise the debugger makes a normal function return back to its calling point.
The quitif form is very useful in breakpoint command lists. If the given expression evaluates to a non-zero value, control returns to the kernel as in q.
A good understanding of kernel internals is required to get full use of the SCODB debugger. Steve Pate's UNIX System Internals: A Practical Approach[1] (Addison-Wesley, 1996) gives a detailed explanation of the SCO OpenServer 5 kernel and is an excellent reference to use when running SCODB.
The following conventions are used throughout this document:
debug0:1
is system output
(the SCODB prompt in this case);
bp s5readi
is user input.
debug0:1> bp s5readi