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