SETDEBUG(2)                      System Calls                      SETDEBUG(2)




NAME

       setdebug - set kernel debugging output options


SYNOPSIS

       #include <gno/gno.h>

       int setdebug(int options);


DESCRIPTION

       setdebug enables and disables various debugging routines built into the
       kernel.  The routines display useful debugging information to  standard
       error  (except  for dbgSIG, see BUGS).  Debug output is enabled by set-
       ting the corresponding bit in options, according to the  following  ta-
       ble.   To turn off all debugging output, options should be set to zero.
       The various debug options are #defined in <gno/gno.h>.

       dbgGSOS
              When this bit is set, call numbers will be printed out  for  any
              GS/OS  or ORCA/Shell calls that are made.  The number is printed
              in hexadecimal format and is prefixed with a '$' character.  For
              this  and  the  other  GS/OS call debug options, the entire call
              sequence is enclosed in parenthesis '()' to ease tracing  multi-
              ple levels of calls.

       dbgPATH
              If  this  flag is set, every time a filename argument to a GS/OS
              or shell call is fully expanded the  expanded  version  is  dis-
              played as follows:
                   EP: <fullpath>

       dbgERROR
              For  every GS/OS call that is made, if an error occurs the error
              code is printed in inverse lettering in hexadecimal format.  The
              code is prefixed with a '#' to distinguish the error code from a
              call code on terminals that do not support inverse mode.  If  no
              error  occurs  on the call, no code is printed.  This option has
              no effect unless dbgGSOS is also enabled.

       dbgSIG This flag enables signal tracing.  Each time a signal  is  sent,
              whether  by kill(2), job control, or keyboard, the signal number
              and target process is displayed.  The format is:
                   kill (-signum): pid: tpid

       dbgSYSCALL
              The parameter lists to common system calls are displayed by this
              option  flag.   The actual format of the output varies from call
              to call.   The  calls  that  currently  support  this  flag  are
              _execve(2),  fork(2), settpgrp(2), tcnewpgrp(2), and tctpgrp(2).

       dbgPBLOCK
              The memory addresses of GS/OS and ORCA/Shell parameter parameter
              blocks are printed for each call.  As with dbgERROR, this option
              has no effect unless dbgGSOS is also enabled.


RETURN VALUE

       setdebug returns the previous value of the debug options word.


BUGS

       Due to problems associated with signals that are  sent  during  process
       termination,  dgbSIG  prints its information to standard output instead
       of standard error.


SEE ALSO

       fork (2), execve (2), ioctl (2), kill (2)



GNO                             19 January 1997                    SETDEBUG(2)

Man(1) output converted with man2html