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

Running SCODB

SCODB is included as an unconfigured pseudo-device driver in the kernel. Note that the kdb debugger must also be configured in order to run scodb.

To activate scodb:

  1. Compile the driver or other kernel source module with the -DDEBUG option and install it in the kernel. If you will be using the source code line number feature), compile the source module with the -g -w0,-d1 options. Note that code compiled with the -g option may not be optimized.

  2. Load the scodb and kdb drivers into the kernel with the following commands.

    modadmin -l kdb
    modadmin -l scodb

    Be sure that the driver you are debugging is also linked into the kernel.


    NOTE: Do not edit the System(DSP/4dsp) file to statically configure the scodb driver. For SVR5 Releases 7.0.0, 7.0.1, and 7.1, a kernel with scodb statically linked does not boot.

  3. Invoke the kernel debugger by pressing <Alt><Ctrl>D on the console, or by entering kdb on the command line.

    By default, kdb will come up first. To change to scodb from kdb, issue the newdebug command at the kdb prompt and exit kdb by issuing the q or <Ctrl>D command.

    You can also issue the newdebug command in the kdb.rc file, which will cause scodb to come up first when you enter the debugger.

    The kdb prompt is kdb>>, and the scodb prompt is debug0:0>.

  4. When kernel-level SCODB is awaiting input, it displays the following prompt:
       debugn:m>
    

    n
    is a number indicating the entry level in the debugger. In general, the entry level will be 0; if SCODB is reentered or a panic occurs while in the debugger, the entry level will be incremented. The level is decremented when exiting the debugger.

    m
    indicates the engine number.

  5. Issue SCODB commands for the functionality required.


© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005