⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sym.h

📁 这个是LINUX下的GDB调度工具的源码
💻 H
📖 第 1 页 / 共 2 页
字号:
#define issNil -1#define issNull 0/* The following converts a memory resident string to an iss. * This hack is recognized in SbFIss, in sym.c of the debugger. */#define IssFSb(sb) (0x80000000 | ((unsigned long)(sb)))/* E X T E R N A L   S Y M B O L  R E C O R D * *	Same as the SYMR except it contains file context to determine where *	the index is. */typedef struct ecoff_extr {	unsigned jmptbl:1;	/* symbol is a jump table entry for shlibs */	unsigned cobol_main:1;	/* symbol is a cobol main procedure */	unsigned weakext:1;	/* symbol is weak external */	unsigned reserved:13;	/* reserved for future use */	int	ifd;		/* where the iss and index fields point into */	SYMR	asym;		/* symbol for the external */	} EXTR, *pEXTR;#define extNil ((pEXTR)0)#define cbEXTR sizeof(EXTR)/* A U X I L L A R Y   T Y P E	 I N F O R M A T I O N *//* * Type Information Record */typedef struct {	unsigned fBitfield : 1; /* set if bit width is specified */	unsigned continued : 1; /* indicates additional TQ info in next AUX */	unsigned bt  : 6;	/* basic type */	unsigned tq4 : 4;	unsigned tq5 : 4;	/* ---- 16 bit boundary ---- */	unsigned tq0 : 4;	unsigned tq1 : 4;	/* 6 type qualifiers - tqPtr, etc. */	unsigned tq2 : 4;	unsigned tq3 : 4;	} TIR, *pTIR;#define cbTIR sizeof(TIR)#define tiNil ((pTIR)0)#define itqMax 6/* * Relative symbol record * * If the rfd field is 4095, the index field indexes into the global symbol *	table. */typedef struct {	unsigned	rfd : 12;    /* index into the file indirect table */	unsigned	index : 20; /* index int sym/aux/iss tables */	} RNDXR, *pRNDXR;#define cbRNDXR sizeof(RNDXR)#define rndxNil ((pRNDXR)0)/* dense numbers or sometimes called block numbers are stored in this type, *	a rfd of 0xffffffff is an index into the global table. */typedef struct {	unsigned long	rfd;    /* index into the file table */	unsigned long	index; 	/* index int sym/aux/iss tables */	} DNR, *pDNR;#define cbDNR sizeof(DNR)#define dnNil ((pDNR)0)/* * Auxillary information occurs only if needed. * It ALWAYS occurs in this order when present.	    isymMac		used by stProc only	    TIR			type info	    TIR			additional TQ info (if first TIR was not enough)	    rndx		if (bt == btStruct,btUnion,btEnum,btSet,btRange,				    btTypedef):				    rsym.index == iaux for btSet or btRange				    else rsym.index == isym	    dimLow		btRange, btSet	    dimMac		btRange, btSet	    rndx0		As many as there are tq arrays	    dimLow0	    dimHigh0	    ...	    rndxMax-1	    dimLowMax-1	    dimHighMax-1	    width in bits	if (bit field), width in bits. */#define cAuxMax (6 + (idimMax*3))/* a union of all possible info in the AUX universe */typedef union {	TIR	ti;		/* type information record */	RNDXR	rndx;		/* relative index into symbol table */	long	dnLow;		/* low dimension */	long	dnHigh;		/* high dimension */	long	isym;		/* symbol table index (end of proc) */	long	iss;		/* index into string space (not used) */	long	width;		/* width for non-default sized struc fields */	long	count;		/* count of ranges for variant arm */	} AUXU, *pAUXU;#define cbAUXU sizeof(AUXU)#define auxNil ((pAUXU)0)#define iauxNil -1/* * Optimization symbols * * Optimization symbols contain some overlap information with the normal * symbol table. In particular, the proc information * is somewhat redundant but necessary to easily find the other information * present.  * * All of the offsets are relative to the beginning of the last otProc */typedef struct {	unsigned ot: 8;		/* optimization type */	unsigned value: 24;	/* address where we are moving it to */	RNDXR	rndx;		/* points to a symbol or opt entry */	unsigned long	offset;	/* relative offset this occured */	} OPTR, *pOPTR;#define optNil	((pOPTR) 0)#define cbOPTR sizeof(OPTR)#define ioptNil -1/* * File Indirect * * When a symbol is referenced across files the following procedure is used: *	1) use the file index to get the File indirect entry. *	2) use the file indirect entry to get the File descriptor. *	3) add the sym index to the base of that file's sym table * */typedef long RFDT, *pRFDT;#define cbRFDT sizeof(RFDT)#define rfdNil	-1/* * The file indirect table in the mips loader is known as an array of FITs. * This is done to keep the code in the loader readable in the area where * these tables are merged.  Note this is only a name change. */typedef long FIT, *pFIT;#define cbFIT	sizeof(FIT)#define ifiNil	-1#define fiNil	((pFIT) 0)#ifdef _LANGUAGE_PASCAL#define ifdNil -1#define ilnNil -1#define ipdNil -1#define ilineNil -1#define isymNil -1#define indexNil 16#fffff#define issNil -1#define issNull 0#define itqMax 6#define iauxNil -1#define ioptNil -1#define rfdNil -1#define ifiNil -1#endif	/* _LANGUAGE_PASCAL *//* Dense numbers * * Rather than use file index, symbol index pairs to represent symbols *	and globals, we use dense number so that they can be easily embeded *	in intermediate code and the programs that process them can *	use direct access tabls instead of hash table (which would be *	necesary otherwise because of the sparse name space caused by *	file index, symbol index pairs. Dense number are represented *	by RNDXRs. *//* * The following table defines the meaning of each SYM field as * a function of the "st". (scD/B == scData OR scBss) * * Note: the value "isymMac" is used by symbols that have the concept * of enclosing a block of related information.	 This value is the * isym of the first symbol AFTER the end associated with the primary * symbol. For example if a procedure was at isym==90 and had an * isymMac==155, the associated end would be at isym==154, and the * symbol at 155 would probably (although not necessarily) be the * symbol for the next procedure.  This allows rapid skipping over * internal information of various sorts. "stEnd"s ALWAYS have the * isym of the primary symbol that started the block. * ST		SC	VALUE		INDEX--------	------	--------	------stFile		scText	address		isymMacstLabel		scText	address		---stGlobal	scD/B	address		iauxstStatic	scD/B	address		iauxstParam		scAbs	offset		iauxstLocal		scAbs	offset		iauxstProc		scText	address		iaux	(isymMac is first AUX)stStaticProc	scText	address		iaux	(isymMac is first AUX)stMember	scNil	ordinal		---	(if member of enum)	(mipsread thinks the case below has a bit, not byte, offset.)stMember	scNil	byte offset	iaux	(if member of struct/union)stMember	scBits	bit offset	iaux	(bit field spec)stBlock		scText	address		isymMac (text block)	(the code seems to think that rather than scNil, we see scInfo for	 the two cases below.)stBlock		scNil	cb		isymMac (struct/union member define)stBlock		scNil	cMembers	isymMac (enum member define)	(New types added by SGI to simplify things:)stStruct	scInfo	cb		isymMac (struct type define)stUnion		scInfo	cb		isymMac (union  type define)stEnum		scInfo	cMembers	isymMac (enum   type define)stEnd		scText	address		isymStartstEnd		scNil	-------		isymStart (struct/union/enum)stTypedef	scNil	-------		iauxstRegReloc	sc???	value		old register numberstForward	sc???	new address	isym to original symbolstConstant	scInfo	value		--- (scalar)stConstant	scInfo	iss		--- (complex, e.g. string) * */#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -