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