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

📄 tm-rs6000.h

📁 早期freebsd实现
💻 H
📖 第 1 页 / 共 2 页
字号:
/* Parameters for target execution on an RS6000, for GDB, the GNU debugger.   Copyright (C) 1986, 1987, 1989, 1991 Free Software Foundation, Inc.   Contributed by IBM Corporation.This file is part of GDB.This program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */extern int	symtab_relocated;/* Minimum possible text address in AIX */#define TEXT_SEGMENT_BASE	0x10000000/* text addresses in a core file does not necessarily match to symbol table,   if symbol table relocation wasn't done yet. */#define	CORE_NEEDS_RELOCATION(PC)	\  if (!symtab_relocated && !inferior_pid && (PC) >  TEXT_SEGMENT_BASE)	\    (PC) -= ( TEXT_SEGMENT_BASE + text_adjustment (exec_bfd));/* Load segment of a given pc value. */#define	PC_LOAD_SEGMENT(PC)	pc_load_segment_name(PC)/* Conversion between a register number in stab string to actual register num. */#define	STAB_REG_TO_REGNUM(value)	(value)/* return true if a given `pc' value is in `call dummy' function. */#define	PC_IN_CALL_DUMMY(STOP_PC, STOP_SP, STOP_FRAME_ADDR)	\	(STOP_SP < STOP_PC && STOP_PC < STACK_END_ADDR)/* For each symtab, we keep track of which BFD it came from.  */#define	EXTRA_SYMTAB_INFO	\	unsigned    nonreloc:1;		/* TRUE if non relocatable */#define	INIT_EXTRA_SYMTAB_INFO(symtab)	\	symtab->nonreloc = 0;		\extern unsigned int text_start, data_start;extern int inferior_pid;extern char *corefile;/* setpgrp() messes up controling terminal. The other version of it   requires libbsd.a. */#define	setpgrp(XX,YY)		setpgid (XX, YY)/* We are missing register descriptions in the system header files. Sigh! */struct regs {	int	gregs [32];		/* general purpose registers */	int	pc;			/* program conter	*/	int	ps;			/* processor status, or machine state */};struct fp_status {	double	fpregs [32];		/* floating GP registers */};/* To be used by function_frame_info. */struct aix_framedata {  int	offset;				/* # of bytes in gpr's and fpr's are saved */  int	saved_gpr;			/* smallest # of saved gpr */  int	saved_fpr;			/* smallest # of saved fpr */  int	alloca_reg;			/* alloca register number (frame ptr) */  char	frameless;			/* true if frameless functions. */};void function_frame_info PARAMS ((CORE_ADDR, struct aix_framedata *));/* Define the byte order of the machine.  */#define TARGET_BYTE_ORDER	BIG_ENDIAN/* Define this if the C compiler puts an underscore at the front   of external names before giving them to the linker.  */#undef NAMES_HAVE_UNDERSCORE/* AIX's assembler doesn't grok dollar signs in identifiers.   So we use dots instead.  This item must be coordinated with G++. */#undef CPLUS_MARKER#define CPLUS_MARKER '.'/* Offset from address of function to start of its code.   Zero on most machines.  */#define FUNCTION_START_OFFSET 0/* Advance PC across any function entry prologue instructions   to reach some "real" code.  */#define SKIP_PROLOGUE(pc)	pc = skip_prologue (pc)/* If PC is in some function-call trampoline code, return the PC   where the function itself actually starts.  If not, return NULL.  */#define	SKIP_TRAMPOLINE_CODE(pc)	skip_trampoline_code (pc)/* When a child process is just starting, we sneak in and relocate   the symbol table (and other stuff) after the dynamic linker has   figured out where they go. But we want to do this relocation just   once. */extern int loadinfotextindex;#define	SOLIB_CREATE_INFERIOR_HOOK(PID)	\  do {					\    if (loadinfotextindex == 0)	\	xcoff_relocate_symtab (PID);	\  } while (0)	/* Number of trap signals we need to skip over, once the inferior process   starts running. */#define	START_INFERIOR_TRAPS_EXPECTED	2/* AIX might return a sigtrap, with a "stop after load" status. It should   be ignored by gdb, shouldn't be mixed up with breakpoint traps. *//* Another little glitch  in AIX is signal 0. I have no idea why wait(2)   returns with this status word. It looks harmless. */#define SIGTRAP_STOP_AFTER_LOAD(W)	\ if ( (W) == 0x57c || (W) == 0x7f) {	\   if ((W)==0x57c && breakpoints_inserted) {	\     mark_breakpoints_out ();		\     insert_breakpoints ();		\     insert_step_breakpoint ();		\   }					\   resume (0, 0);			\   continue;				\ }/* In xcoff, we cannot process line numbers when we see them. This is   mainly because we don't know the boundaries of the include files. So,   we postpone that, and then enter and sort(?) the whole line table at   once, when we are closing the current symbol table in end_symtab(). */#define	PROCESS_LINENUMBER_HOOK()	aix_process_linenos ()      /* When a target process or core-file has been attached, we sneak in   and figure out where the shared libraries have got to. In case there   is no inferior_process exists (e.g. bringing up a core file), we can't   attemtp to relocate symbol table, since we don't have information about   load segments. */#define	SOLIB_ADD(a, b, c)	\   if (inferior_pid)	xcoff_relocate_symtab (inferior_pid)/* Immediately after a function call, return the saved pc.   Can't go through the frames for this because on some machines   the new frame is not set up until the new function executes   some instructions.  */#define	SAVED_PC_AFTER_CALL(frame)	\	(register_valid [LR_REGNUM] ? 	\	  (*(int*)&registers[REGISTER_BYTE (LR_REGNUM)]) :	\	  read_register (LR_REGNUM))/*#define SAVED_PC_AFTER_CALL(frame)	saved_pc_after_call(frame) *//* Address of end of stack space.  */#define STACK_END_ADDR 0x2ff80000/* Stack grows downward.  */#define INNER_THAN <#if 0/* No, we shouldn't use this. push_arguments() should leave stack in a   proper alignment! *//* Stack has strict alignment. */#define STACK_ALIGN(ADDR)	(((ADDR)+7)&-8)#endif/* This is how argumets pushed onto stack or passed in registers. */#define	PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \  sp = push_arguments(nargs, args, sp, struct_return, struct_addr)/* Sequence of bytes for breakpoint instruction.  */#define BREAKPOINT {0x7d, 0x82, 0x10, 0x08}/* Amount PC must be decremented by after a breakpoint.   This is often the number of bytes in BREAKPOINT   but not always.  */#define DECR_PC_AFTER_BREAK 0/* Nonzero if instruction at PC is a return instruction.  *//* Allow any of the return instructions, including a trapv and a return   from interrupt.  */#define ABOUT_TO_RETURN(pc)  \   ((read_memory_integer (pc, 4) & 0xfe8007ff) == 0x4e800020)/* Return 1 if P points to an invalid floating point value.  */#define INVALID_FLOAT(p, len) 0   /* Just a first guess; not checked *//* Largest integer type */#define LONGEST long/* Name of the builtin type for the LONGEST type above. */#define BUILTIN_TYPE_LONGEST builtin_type_long/* Say how long (ordinary) registers are.  */#define REGISTER_TYPE long/* Number of machine registers */#define NUM_REGS 71/* Initializer for an array of names of registers.   There should be NUM_REGS strings in this initializer.  */#define REGISTER_NAMES  \ {"r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7",  \  "r8", "r9", "r10","r11","r12","r13","r14","r15", \  "r16","r17","r18","r19","r20","r21","r22","r23", \  "r24","r25","r26","r27","r28","r29","r30","r31", \  "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",  \  "f8", "f9", "f10","f11","f12","f13","f14","f15", \  "f16","f17","f18","f19","f20","f21","f22","f23", \  "f24","f25","f26","f27","f28","f29","f30","f31", \  "pc", "ps", "cnd", "lr", "cnt", "xer", "mq" }/* Register numbers of various important registers.   Note that some of these values are "real" register numbers,   and correspond to the general registers of the machine,   and some are "phony" register numbers which are too large   to be actual register numbers as far as the user is concerned   but do serve to get the desired values when passed to read_register.  */#define FP_REGNUM 1		/* Contains address of executing stack frame */#define SP_REGNUM 1		/* Contains address of top of stack */#define	TOC_REGNUM 2		/* TOC register */#define FP0_REGNUM 32		/* Floating point register 0 */#define	GP0_REGNUM 0		/* GPR register 0 */#define FP0_REGNUM 32		/* FPR (Floating point) register 0 */#define FPLAST_REGNUM 63	/* Last floating point register */  /* Special purpose registers... *//* P.S. keep these in the same order as in /usr/mstsave.h `mstsave' structure, for   easier processing */#define PC_REGNUM 64		/* Program counter (instruction address %iar) */#define PS_REGNUM 65		/* Processor (or machine) status (%msr) */#define	CR_REGNUM 66		/* Condition register */#define	LR_REGNUM 67		/* Link register */#define	CTR_REGNUM 68		/* Count register */#define	XER_REGNUM 69		/* Fixed point exception registers */#define	MQ_REGNUM 70		/* Multiply/quotient register */#define	FIRST_SP_REGNUM 64	/* first special register number */#define LAST_SP_REGNUM  70	/* last special register number *//* Total amount of space needed to store our copies of the machine's   register state, the array `registers'.	32 4-byte gpr's	32 8-byte fpr's	7  4-byte special purpose registers,    total 416 bytes. Keep some extra space for now, in case to add more. */#define REGISTER_BYTES 420/* Index within `registers' of the first byte of the space for   register N.  */#define REGISTER_BYTE(N)  \ (								\  ((N) > FPLAST_REGNUM) ? ((((N) - FPLAST_REGNUM -1) * 4) + 384)\  :((N) >= FP0_REGNUM) ? ((((N) - FP0_REGNUM) * 8) + 128)	\  :((N) * 4) )/* Number of bytes of storage in the actual machine representation   for register N. *//* Note that the unsigned cast here forces the result of the   subtractiion to very high positive values if N < FP0_REGNUM */

⌨️ 快捷键说明

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