gno/usr.man/man2/setdebug.2
1997-02-27 07:32:31 +00:00

86 lines
2.6 KiB
Groff

.\"
.\" $Id: setdebug.2,v 1.1 1997/02/27 07:32:15 gdr Exp $
.\"
.TH SETDEBUG 2 "19 January 1997" GNO "System Calls"
.SH NAME
.BR setdebug
\- set kernel debugging output options
.SH SYNOPSIS
#include <gno/gno.h>
.sp 1
int
\fBsetdebug\fR(int \fIoptions\fR);
.SH DESCRIPTION
.BR setdebug
enables and disables various debugging routines built into the kernel.
The routines display useful debugging information to standard error (except
for
.BR dbgSIG ,
see BUGS). Debug output is enabled by setting the corresponding bit in
.IR options ,
according to the following table. To turn off all debugging output,
.IR options
should be set to zero. The various debug options are #defined in
<gno/gno.h>.
.IP \fBdbgGSOS\fR
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 multiple
levels of calls.
.IP \fBdbgPATH\fR
If this flag is set, every time a filename argument to a GS/OS or shell
call is fully expanded the expanded version is displayed as follows:
.nf
EP: <fullpath>
.fi
.IP \fBdbgERROR\fR
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
.BR dbgGSOS
is also enabled.
.IP \fBdbgSIG\fR
This flag enables signal tracing. Each time a signal is sent, whether by
.BR kill (2),
job control, or keyboard, the signal number and target process is displayed.
The format is:
.nf
kill (-\fIsignum\fR): \fIpid\fR: \fItpid\fR
.fi
.IP \fBdbgSYSCALL\fR
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
.BR _execve (2),
.BR fork (2),
.BR settpgrp (2),
.BR tcnewpgrp (2),
and
.BR tctpgrp (2).
.IP \fBdbgPBLOCK\fR
The memory addresses of GS/OS and ORCA/Shell parameter parameter blocks
are printed for each call. As with
.BR dbgERROR ,
this option has no effect unless
.BR dbgGSOS
is also enabled.
.SH RETURN VALUE
.BR setdebug
returns the previous value of the debug
.IR options
word.
.SH BUGS
Due to problems associated with signals that are sent during process
termination,
.BR dgbSIG
prints its information to standard output instead of standard error.
.SH SEE ALSO
fork (2),
execve (2),
ioctl (2),
kill (2)