xref: /illumos-gate/usr/src/head/linenum.h (revision c65ebfc7045424bd04a6c7719a27b0ad3399ad54)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*	Copyright (c) 1988 AT&T	*/
23 /*	  All Rights Reserved	*/
24 
25 
26 #ifndef _LINENUM_H
27 #define	_LINENUM_H
28 
29 #ifdef	__cplusplus
30 extern "C" {
31 #endif
32 
33 /*
34  *  There is one line number entry for every
35  *  "breakpointable" source line in a section.
36  *  Line numbers are grouped on a per function
37  *  basis; the first entry in a function grouping
38  *  will have l_lnno = 0 and in place of physical
39  *  address will be the symbol table index of
40  *  the function name.
41  */
42 struct lineno
43 {
44 	union
45 	{
46 		long	l_symndx;	/* sym. table index of function name */
47 					/* iff l_lnno == 0 */
48 		long	l_paddr;	/* (physical) address of line number */
49 	}		l_addr;
50 	unsigned short	l_lnno;		/* line number */
51 };
52 
53 #define	LINENO	struct lineno
54 #define	LINESZ	6	/* sizeof(LINENO) */
55 
56 #ifdef	__cplusplus
57 }
58 #endif
59 
60 #endif	/* _LINENUM_H */
61