Quake-III-Arena

Quake III Arena GPL Source Release
Log | Files | Refs

stab.h (4194B)


      1 /*      @(#)stab.h 1.11 92/05/11 SMI      */
      2 /*
      3  * Copyright (c) 1990 by Sun Microsystems, Inc.
      4  */
      5 
      6 /*
      7  * This file gives definitions supplementing <a.out.h>
      8  * for permanent symbol table entries.
      9  * These must have one of the N_STAB bits on,
     10  * and are subject to relocation according to the masks in <a.out.h>.
     11  */
     12 
     13 #ifndef _STAB_H
     14 #define _STAB_H
     15 
     16 
     17 #if !defined(_a_out_h) && !defined(_A_OUT_H)
     18 /* this file contains fragments of a.out.h and stab.h relevant to
     19  * support of stabX processing within ELF files - see the
     20  * Format of a symbol table entry
     21  */
     22 struct  nlist {
     23         union {
     24                 char    *n_name;     /* for use when in-core */
     25                 long    n_strx;      /* index into file string table */
     26         } n_un;
     27         unsigned char   n_type;      /* type flag (N_TEXT,..)  */
     28         char    n_other;             /* unused */
     29         short   n_desc;              /* see <stab.h> */
     30         unsigned long   n_value;     /* value of symbol (or sdb offset) */ 
     31 };
     32  
     33 /*
     34  * Simple values for n_type.
     35  */
     36 #define N_UNDF  0x0             /* undefined */
     37 #define N_ABS   0x2             /* absolute */
     38 #define N_TEXT  0x4             /* text */
     39 #define N_DATA  0x6             /* data */
     40 #define N_BSS   0x8             /* bss */
     41 #define N_COMM  0x12            /* common (internal to ld) */
     42 #define N_FN    0x1f            /* file name symbol */
     43  
     44 #define N_EXT   01              /* external bit, or'ed in */
     45 #define N_TYPE  0x1e            /* mask for all the type bits */
     46 
     47 #endif
     48 
     49 /*
     50  * for symbolic debugger, sdb(1):
     51  */
     52 #define	N_GSYM	0x20		/* global symbol: name,,0,type,0 */
     53 #define	N_FNAME	0x22		/* procedure name (f77 kludge): name,,0 */
     54 #define	N_FUN	0x24		/* procedure: name,,0,linenumber,address */
     55 #define	N_STSYM	0x26		/* static symbol: name,,0,type,address */
     56 #define	N_LCSYM	0x28		/* .lcomm symbol: name,,0,type,address */
     57 #define N_MAIN  0x2a            /* name of main routine : name,,0,0,0 */
     58 #define N_ROSYM 0x2c		/* ro_data objects */
     59 #define N_OBJ	0x38		/* object file path or name */
     60 #define N_OPT	0x3c		/* compiler options */
     61 #define	N_RSYM	0x40		/* register sym: name,,0,type,register */
     62 #define	N_SLINE	0x44		/* src line: 0,,0,linenumber,address */
     63 #define	N_FLINE	0x4c		/* function start.end */
     64 #define	N_SSYM	0x60		/* structure elt: name,,0,type,struct_offset */
     65 #define N_ENDM	0x62		/* last stab emitted for module */
     66 #define	N_SO	0x64		/* source file name: name,,0,0,address */
     67 #define	N_LSYM	0x80		/* local sym: name,,0,type,offset */
     68 #define	N_BINCL 0x82		/* header file: name,,0,0,0 */
     69 #define	N_SOL	0x84		/* #included file name: name,,0,0,address */
     70 #define	N_PSYM	0xa0		/* parameter: name,,0,type,offset */
     71 #define N_EINCL 0xa2		/* end of include file */
     72 #define	N_ENTRY	0xa4		/* alternate entry: name,linenumber,address */
     73 #define	N_LBRAC	0xc0		/* left bracket: 0,,0,nesting level,address */
     74 #define	N_EXCL	0xc2		/* excluded include file */
     75 #define	N_RBRAC	0xe0		/* right bracket: 0,,0,nesting level,address */
     76 #define	N_BCOMM	0xe2		/* begin common: name,, */
     77 #define	N_ECOMM	0xe4		/* end common: name,, */
     78 #define	N_ECOML	0xe8		/* end common (local name): ,,address */
     79 #define	N_LENG	0xfe		/* second stab entry with length information */
     80 
     81 /*
     82  * for the berkeley pascal compiler, pc(1):
     83  */
     84 #define	N_PC	0x30		/* global pascal symbol: name,,0,subtype,line */
     85 #define	N_WITH	0xea		/* pascal with statement: type,,0,0,offset */
     86 
     87 /*
     88  * for code browser only
     89  */
     90 #define N_BROWS	0x48		/* path to associated .cb file */
     91 
     92 /*
     93  * Optional langauge designations for N_SO
     94  */
     95 #define N_SO_AS         1       /* Assembler    */
     96 #define N_SO_C          2       /* C            */
     97 #define N_SO_ANSI_C     3       /* ANSI C       */
     98 #define N_SO_CC         4       /* C++          */
     99 #define N_SO_FORTRAN    5       /* Fortran 77   */
    100 #define N_SO_PASCAL     6       /* Pascal       */
    101 
    102 /*
    103  * Floating point type values
    104  */
    105 #define NF_NONE		0	/* Undefined type 	*/
    106 #define NF_SINGLE	1	/* IEEE 32 bit float	*/
    107 #define NF_DOUBLE	2	/* IEEE 64 bit float	*/
    108 #define NF_COMPLEX	3	/* Fortran complex 	*/
    109 #define NF_COMPLEX16	4	/* Fortran double complex */
    110 #define NF_COMPLEX32	5	/* Fortran complex*16	*/
    111 #define NF_LDOUBLE 	6	/* Long double		*/
    112 
    113 #endif