From owner-man-jp-reviewer@jp.freebsd.org  Thu May 21 12:41:59 1998
Received: (from daemon@localhost)
	by jaz.jp.freebsd.org (8.8.8+3.0Wbeta13/8.7.3) id MAA07215;
	Thu, 21 May 1998 12:41:59 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from sentinel.info.nara-k.ac.jp (sentinel.info.nara-k.ac.jp [202.24.246.106])
	by jaz.jp.freebsd.org (8.8.8+3.0Wbeta13/8.7.3) with ESMTP id MAA07209
	for <man-jp-reviewer@jp.freebsd.org>; Thu, 21 May 1998 12:41:57 +0900 (JST)
	(envelope-from mutoh@info.nara-k.ac.jp)
Received: from localhost (localhost [127.0.0.1]) by sentinel.info.nara-k.ac.jp (8.8.5/8.7.3) with ESMTP id MAA03283 for <man-jp-reviewer@jp.freebsd.org>; Thu, 21 May 1998 12:41:46 +0900 (JST)
To: man-jp-reviewer@jp.freebsd.org
X-Mailer: Mew version 1.70 on Emacs 19.28.1 / Mule 2.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit
Message-Id: <19980521124146L.mutoh@info.nara-k.ac.jp>
Date: Thu, 21 May 1998 12:41:46 +0900
From: Takeshi MUTOH <mutoh@info.nara-k.ac.jp>
X-Dispatcher: imput version 971024
Lines: 225
Reply-To: man-jp-reviewer@jp.freebsd.org
Precedence: list
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=24]
X-Sequence: man-jp-reviewer 144
Subject: [man-jp-reviewer 144] stab.5
Errors-To: owner-man-jp-reviewer@jp.freebsd.org
Sender: owner-man-jp-reviewer@jp.freebsd.org

$BIpF#(B@$BF`NI9b@l$G$9!%(B

stab.5$B$NLu$G$9!%(B

.\" Copyright (c) 1980, 1991, 1993
.\"	The Regents of the University of California.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)stab.5	8.1 (Berkeley) 6/5/93
.\"	$Id: stab.5,v 1.2.2.1 1997/03/07 04:18:12 mpp Exp $
.\"
.Dd June 5, 1993
.Dt STAB 5
.Os BSD 4
.Sh $BL>>N(B
.Nm stab
.Nd $B%7%s%\%k%F!<%V%k$N7A<0(B
.Sh $B=q<0(B
.Fd #include <stab.h>
.Sh $B2r@b(B
.Aq Pa stab.h
$B%U%!%$%k$O(B
a.out $B%U%!%$%k$N$?$a$N(B
.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j$N=g$KJ]B8$9$k$3$H(B
$B$rJ]>Z$7$^$9!#(B
.Xr a.out 5 
$B$K5-=R$5$l$F$$$k$h$&$K!"%7%s%\%kI=$NMWAG$O0J2<$N9=B$$r;}$A$^$9(B:
.Bd -literal
/*
* $B%7%s%\%kI=%(%s%H%j$N=q<0(B
*/

struct nlist {
	union {
		char	*n_name;	/* $B%3%"FbIt(B (in-core) $B$G;HMQ(B */
		long	n_strx;		/* $B%U%!%$%kJ8;zNsI=$X$N%$%s%G%C%/%9(B */
	} n_un;
	unsigned char	n_type;		/* $B7?$N%U%i%0(B */
	char		n_other;	/* $B;HMQ$5$l$F$$$J$$(B */
	short		n_desc;		/* $B0J2<$N(B struct desc $B;2>H(B */
	unsigned	n_value;	/* $B%"%I%l%9$^$?$O%*%U%;%C%H$^$?$O9T(B */
};
.Ed
.Pp
.Fa n_type
$B%U%#!<%k%I$N2<0L%S%C%H$O!"(B
.Aq Pa a.out.h 
$B$J$$$GDj5A$5$l$F$$$k0J2<$N%^%9%/$K4p$E$$$?$[$H$s$I0l$D$N%;%0%a%s%H$X$N(B
$B%7%s%\%k$N>l=j$H$7$F;H$o$l$^$9!#(B
$B%7%s%\%k$O!"$3$l$i$N%;%0%a%s%H%S%C%H@_Dj$r$7$J$$$3$H$G$3$l$i$N%;%0%a%s(B
$B%H$r4^$^$J$$$3$H$b$G$-$^$9!#(B
.Bd -literal
/*
* n_type$B$NC1=c$JCM(B
*/

#define	N_UNDF	0x0	/* $BDj5A$5$l$F$$$J$$(B */
#define	N_ABS	0x2	/* $B@dBP;XDj(B */
#define	N_TEXT	0x4	/* $B%F%-%9%H(B */
#define	N_DATA	0x6	/* $B%G!<%?(B */
#define	N_BSS	0x8	/* bss */

#define	N_EXT	01	/* or $B$5$l$?;H$o$l$kM>J,$N%S%C%H(B */
.Ed
.Pp
.Fa n_value
$B$N%7%s%\%k$O!"%j%s%+(B
.Xr ld 1
$B$K$h$C$F!"@5$7$$%;%0%a%s%HFb$N%"%I%l%9$K:FG[CV$5$l$^$9!#(B
$B$I$N%;%0%a%s%H$K$bF~$C$F$$$J$$(B
.Fa n_value
$B%U%#!<%k%I$N%7%s%\%k$O%j%s%+$K$h$C$FJQ99$5$l$^$;$s!#(B
$B$5$i$K!"(B
.Fa n_type
$B%U%#!<%k%I$,0J2<$N%S%C%H%;%C%H$N0l$D$r;}$C$F$$$J$$8B$j!"(B
$B%j%s%+$O<+J,$,;}$C$F$$$k5,B'$K$7$?$,$C$F!"(B
$B$"$k%7%s%\%k$r@Z$j<N$F$^$9(B:
.Bd -literal
/*
* $B$=$NB>$N1JB3E*$J%7%s%\%kI=%(%s%H%j$O!"$$$/$D$+$N(B N_STAB $B%S%C%H%;%C%H$r;}$A$^$9!#(B
* $B$3$l$i$O!"(B <stab.h> $BFb$K5-=R$,$"$j$^$9!#(B
*/

#define	N_STAB	0xe0	/* $B$b$7$3$l$i$N%S%C%H%;%C%H$N$$$:$l$+$,@_Dj$5$l$F$$$l$P@Z$j<N$F$i$l$^$;$s(B */
.Ed
.Pp
$B$3$l$O!"MM!9$J%;%0%a%s%H$N4V$rJ,$1$k(B 112 (7 \(** 16) $B$N%7%s%\%k7?$rDj(B
$B5A$G$-$k$h$&$K$7$^$9!#(B
$B$3$l$i$N$$$/$D$+$K$D$$$F$O4{$K=R$Y$i$l$F$$$^$9!#(B
$B8E$$%7%s%\%j%C%/%G%P%C%,(B
.Em sdb 
$B$O!"0J2<$N(B n_type $BCM$r;H$$$^$9(B:
.Bd -literal
#define	N_GSYM	0x20	/* $B%0%m!<%P%k%7%s%\%k(B : name,,0,type,0 */
#define	N_FNAME	0x22	/* $B%W%m%7%8%cL>(B (f77 kludge): name,,0 */
#define	N_FUN	0x24	/* $B%W%m%7%8%c(B: name,,0,linenumber,address */
#define	N_STSYM	0x26	/* $B@EE*%7%s%\%k(B: name,,0,type,address */
#define	N_LCSYM	0x28	/* .lcomm $B%7%s%\%k(Bl: name,,0,type,address */
#define	N_RSYM	0x40	/* $B%l%8%9%?%7%s%\%k(B: name,,0,type,register */
#define	N_SLINE	0x44	/* $B%=!<%99T(B: 0,,0,linenumber,address */
#define	N_SSYM	0x60	/* structure elt: name,,0,type,struct_offset */
#define	N_SO	0x64	/* $B%=!<%9%U%!%$%kL>(B: name,,0,0,address */
#define	N_LSYM	0x80	/* $B%m!<%+%k%7%s%\%k(B: name,,0,type,offset */
#define	N_SOL	0x84	/* #include$B$5$l$?%U%!%$%kL>(B: name,,0,0,address */
#define	N_PSYM	0xa0	/* $B%Q%i%a!<%?(B: name,,0,type,offset */
#define	N_ENTRY	0xa4	/* $BJL$N%(%s%H%j(B: name,linenumber,address */
#define	N_LBRAC	0xc0	/* $B:8$+$C$3(B: 0,,0,nesting level,address */
#define	N_RBRAC	0xe0	/* $B1&$+$C$3(B: 0,,0,nesting level,address */
#define	N_BCOMM	0xe2	/* $B6&DL$N3+;OId9g(B: name,, */
#define	N_ECOMM	0xe4	/* $B6&DL$N=*N;Id9g(B: name,, */
#define	N_ECOML	0xe8	/* ($B%m!<%+%kL>$N(B)$B6&DL$N=*N;Id9g(B: ,,address */
#define	N_LENG	0xfe	/* $BD9$5>pJs$r;}$C$?(B2$BHVL\$N(B stab $B%(%s%H%j(B */
.Ed
.Pp
$B$3$3$G!"%3%a%s%H$K$O(B
$BM?$($i$l$?(B
.Fa n_type
$B$N(B
.Fa n_name ,
.Fa n_other ,
.Fa n_desc ,
.Fa n_value
$B%U%#!<%k%I(B
$B$H(B
.Em sdb
.Fa s
$B$NE57?E*$JMxMQK!$,=q$+$l$F$$$^$9!#(B
.Em sdb
$B$O!"%]!<%?%V%k(BC$B%3%s%Q%$%i(B
.Xr cc 1 
$B$K$h$C$F;H$o$l$k7A<0$N7?$N;XDj;R$r;}$C$F$$$k(B
.Fa n_desc
$B%U%#!<%k%I$r;H$$$^$9(B; $B$3$l$i$N7?$NCM$N%U%)!<%^%C%H$N>\:Y$O%X%C%@%U%!%$%k(B
.Pa pcc.h
$B$r;2>H$7$F2<$5$$!#(B
.Pp
Berkeley $B%Q%9%+%k%3%s%Q%$%i(B
.Xr pc 1 
$B$O!"0J2<$N(B
.Fa n_type
$BCM$r$D$+$$$^$9(B:
.Bd -literal
#define	N_PC	0x30	/* $B%0%m!<%P%k$J%Q%9%+%k%7%s%\%k(B: name,,0,subtype,line */
.Ed
.Pp
and uses the following subtypes to do type checking across separately
compiled files:
.Bd -unfilled -offset indent
1	$B%=!<%9%U%!%$%kL>(B
2	$B%$%s%/%k!<%I$5$l$?%U%!%$%kL>(B
3	$B%0%m!<%P%k$J%i%Y%k(B
4	$B%0%m!<%P%k$JDj?t(B
5	$B%0%m!<%P%k$J7?(B
6	$B%0%m!<%P%k$JJQ?t(B
7	$B%0%m!<%P%k$J4X?t(B
8	$B%0%m!<%P%k$J<jB3$-(B
9	$B30It4X?t(B
10	$B30It<jB3$-(B
11	$B%i%$%V%i%jJQ?t(B
12	$B%i%$%V%i%j%k!<%A%s(B
.Ed
.Sh $B4XO"9`L\(B
.Xr as 1 ,
.Xr ld 1 ,
.Xr a.out 5
.Sh $B%P%0(B
.Pp
$B$b$C$H4pK\E*$J7A<0$,I,MW$G$7$g$&!#(B
.Sh $BNr;K(B
.Nm stab
$B%U%!%$%k$O(B
.Bx 4.0 
$B$+$iEP>l$7$^$7$?!#(B
