stab.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*/
/*
* MAINTAINED BY SPARCompilers
*
* KEEP IN SYNC
*
*/
/* FILE NOT I18N */
/*
* This file gives definitions supplementing <a.out.h>
* for debugging symbol table entries.
* These entries must have one of the N_STAB bits on,
* and are subject to relocation according to the masks in <a.out.h>
* on 4.x (stabs not relocated on SVR4).
*/
#ifndef _STAB_H
#define _STAB_H
/* this file also contains fragments of a.out.h relevant to
* support of stab processing within ELF files
* (when a.out.h is not available)
*/
struct stab {
unsigned n_strx; /* index into file string table */
unsigned char n_type; /* type flag (N_TEXT,..) */
char n_other; /* used by N_SLINE stab */
short n_desc; /* see stabs documentation */
unsigned n_value; /* value of symbol (or sdb offset) */
};
/* patchtypes for N_PATCH stab (n_desc field) */
#define P_BITFIELD 0x1
#define P_SPILL 0x2
#define P_SCOPY 0x3
/* markers for N_CODETAG stab (n_other field) */
/* UNUSED 0x6 DW_ATCF_SUN_branch_target in dwarf, not used in stabs */
/*
* Simple values for n_type.
*/
#endif
/*
* maximum length of stab string before using continuation stab.
* (this is just a suggested limit), assembler has no limit.
*/
#define MAX_STAB_STR_LEN 250
/*
* for symbolic debuggers:
*/
was designed for "function start.end" */
/*
* for analyzer (cache profile feedback support)
*/
/*
* n_descr values used in N_CPROF stabs. The n_descr field of
* an N_CPROF stab identifies the type of table whose location
* is defined by the N_CPROF stab.
*/
typedef enum n_cprof_instr_type_t {
N_CPROF_INSTR_TYPE_LOAD=0, /* profiled load ops */
N_CPROF_INSTR_TYPE_STORE, /* profiled store ops */
N_CPROF_INSTR_TYPE_PREFETCH, /* profiled prefetch ops */
N_CPROF_INSTR_TYPE_BRTARGET, /* branch target locations */
N_CPROF_INSTR_TYPE_NTYPES /* number of types */
/*
* for code browser only
*/
/*
* for functions -- n_other bits for N_FUN stab
*/
#define N_FUN_PURE (1<<0)
/*
* for variables -- n_other bits for N_LSYM, N_GSYM, N_LCSYM, N_STSYM, ...
*/
/*
* Optional language designations for N_SO (n_desc field)
*/
/*
* Floating point type values (encoded in "R" type specification string)
*/
#define NF_NONE 0 /* Undefined type */
#endif