]> git.saurik.com Git - apple/xnu.git/blob - osfmk/ddb/nlist.h
xnu-517.3.7.tar.gz
[apple/xnu.git] / osfmk / ddb / nlist.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * file.
14 *
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25 /*
26 * @OSF_COPYRIGHT@
27 */
28 /*
29 * HISTORY
30 *
31 * Revision 1.1.1.1 1998/09/22 21:05:48 wsanchez
32 * Import of Mac OS X kernel (~semeria)
33 *
34 * Revision 1.1.1.1 1998/03/07 02:26:09 wsanchez
35 * Import of OSF Mach kernel (~mburg)
36 *
37 * Revision 1.1.11.2 1995/01/06 19:11:11 devrcs
38 * mk6 CR668 - 1.3b26 merge
39 * Add padding for alpha, make n_other unsigned,
40 * fix erroneous def of N_FN.
41 * [1994/10/14 03:40:03 dwm]
42 *
43 * Revision 1.1.11.1 1994/09/23 01:23:37 ezf
44 * change marker to not FREE
45 * [1994/09/22 21:11:49 ezf]
46 *
47 * Revision 1.1.4.3 1993/07/27 18:28:42 elliston
48 * Add ANSI prototypes. CR #9523.
49 * [1993/07/27 18:13:44 elliston]
50 *
51 * Revision 1.1.4.2 1993/06/02 23:13:34 jeffc
52 * Added to OSF/1 R1.3 from NMK15.0.
53 * [1993/06/02 20:58:08 jeffc]
54 *
55 * Revision 1.1 1992/09/30 02:24:29 robert
56 * Initial revision
57 *
58 * $EndLog$
59 */
60 /* CMU_HIST */
61 /*
62 * Revision 2.4 91/05/14 15:38:20 mrt
63 * Correcting copyright
64 *
65 * Revision 2.3 91/02/05 17:07:42 mrt
66 * Changed to new Mach copyright
67 * [91/01/31 16:20:26 mrt]
68 *
69 * 11-Aug-88 David Golub (dbg) at Carnegie-Mellon University
70 * Added n_un, n_strx definitions for kernel debugger (from
71 * a.out.h).
72 *
73 */
74 /* CMU_ENDHIST */
75 /*
76 * Mach Operating System
77 * Copyright (c) 1991 Carnegie Mellon University
78 * All Rights Reserved.
79 *
80 * Permission to use, copy, modify and distribute this software and its
81 * documentation is hereby granted, provided that both the copyright
82 * notice and this permission notice appear in all copies of the
83 * software, derivative works or modified versions, and any portions
84 * thereof, and that both notices appear in supporting documentation.
85 *
86 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
87 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
88 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
89 *
90 * Carnegie Mellon requests users of this software to return to
91 *
92 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
93 * School of Computer Science
94 * Carnegie Mellon University
95 * Pittsburgh PA 15213-3890
96 *
97 * any improvements or extensions that they make and grant Carnegie Mellon
98 * the rights to redistribute these changes.
99 */
100 /*
101 */
102 /*
103 * nlist.h - symbol table entry structure for an a.out file
104 * derived from FSF's a.out.gnu.h
105 *
106 */
107
108 #ifndef _DDB_NLIST_H_
109 #define _DDB_NLIST_H_
110
111 struct nlist {
112 union n_un {
113 char *n_name; /* symbol name */
114 long n_strx; /* index into file string table */
115 } n_un;
116 unsigned char n_type; /* type flag, i.e. N_TEXT etc; see below */
117 unsigned char n_other; /* unused */
118 short n_desc; /* see <stab.h> */
119 #if defined(__alpha)
120 int n_pad; /* alignment, used to carry framesize info */
121 #endif
122 vm_offset_t n_value; /* value of this symbol (or sdb offset) */
123 };
124
125 /*
126 * Simple values for n_type.
127 */
128 #define N_UNDF 0 /* undefined */
129 #define N_ABS 2 /* absolute */
130 #define N_TEXT 4 /* text */
131 #define N_DATA 6 /* data */
132 #define N_BSS 8 /* bss */
133 #define N_FN 0x1e /* file name symbol */
134 #define N_EXT 1 /* external bit, or'ed in */
135 #define N_TYPE 0x1e /* mask for all the type bits */
136 #define N_STAB 0xe0 /* if any of these bits set, a SDB entry */
137
138 #endif /* !_DDB_NLIST_H_ */