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

📄 tm-alpha.h

📁 arm-linux-gcc编译器
💻 H
📖 第 1 页 / 共 2 页
字号:
/* Describe the pointer in each stack frame to the previous stack frame   (its caller).  *//* FRAME_CHAIN takes a frame's nominal address   and produces the frame's chain-pointer. */#define FRAME_CHAIN(thisframe) (CORE_ADDR) alpha_frame_chain (thisframe)extern CORE_ADDR alpha_frame_chain PARAMS ((struct frame_info *));/* Define other aspects of the stack frame.  *//* An expression that tells us whether the function invocation represented   by FI does not have a frame on the stack associated with it. *//* We handle this differently for alpha, and maybe we should not */#define FRAMELESS_FUNCTION_INVOCATION(FI)  (0)/* Saved Pc.  */#define FRAME_SAVED_PC(FRAME)	(alpha_frame_saved_pc(FRAME))extern CORE_ADDR  alpha_frame_saved_pc PARAMS ((struct frame_info *));/* The alpha has two different virtual pointers for arguments and locals.   The virtual argument pointer is pointing to the bottom of the argument   transfer area, which is located immediately below the virtual frame   pointer. Its size is fixed for the native compiler, it is either zero   (for the no arguments case) or large enough to hold all argument registers.   gcc uses a variable sized argument transfer area. As it has   to stay compatible with the native debugging tools it has to use the same   virtual argument pointer and adjust the argument offsets accordingly.   The virtual local pointer is localoff bytes below the virtual frame   pointer, the value of localoff is obtained from the PDR.  */#define ALPHA_NUM_ARG_REGS	6#define FRAME_ARGS_ADDRESS(fi)	((fi)->frame - (ALPHA_NUM_ARG_REGS * 8))#define FRAME_LOCALS_ADDRESS(fi) ((fi)->frame - (fi)->localoff)/* Return number of args passed to a frame.   Can return -1, meaning no way to tell.  */#define FRAME_NUM_ARGS(fi)	(-1)/* Return number of bytes at start of arglist that are not really args.  */#define FRAME_ARGS_SKIP 0/* Put here the code to store, into a struct frame_saved_regs,   the addresses of the saved registers of frame described by FRAME_INFO.   This includes special registers such as pc and fp saved in special   ways in the stack frame.  sp is even more special:   the address we return for it IS the sp for the next frame.  */extern void alpha_find_saved_regs PARAMS ((struct frame_info *));#define FRAME_INIT_SAVED_REGS(frame_info) \  do { \    if ((frame_info)->saved_regs == NULL) \      alpha_find_saved_regs (frame_info); \    (frame_info)->saved_regs[SP_REGNUM] = (frame_info)->frame; \  } while (0)/* Things needed for making the inferior call functions.  */#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) \  (alpha_push_arguments((nargs), (args), (sp), (struct_return), (struct_addr)))extern CORE_ADDR  alpha_push_arguments PARAMS ((int, struct value **, CORE_ADDR, int, CORE_ADDR));/* Push an empty stack frame, to record the current PC, etc.  */#define PUSH_DUMMY_FRAME 	alpha_push_dummy_frame()extern voidalpha_push_dummy_frame PARAMS ((void));/* Discard from the stack the innermost frame, restoring all registers.  */#define POP_FRAME		alpha_pop_frame()extern voidalpha_pop_frame PARAMS ((void));/* Alpha OSF/1 inhibits execution of code on the stack.   But there is no need for a dummy on the alpha. PUSH_ARGUMENTS   takes care of all argument handling and bp_call_dummy takes care   of stopping the dummy.  */#define CALL_DUMMY_LOCATION AT_ENTRY_POINT/* On the Alpha the call dummy code is never copied to user space,   stopping the user call is achieved via a bp_call_dummy breakpoint.   But we need a fake CALL_DUMMY definition to enable the proper   call_function_by_hand and to avoid zero length array warnings   in valops.c  */#define CALL_DUMMY { 0 }	/* Content doesn't matter. */#define CALL_DUMMY_START_OFFSET (0)#define CALL_DUMMY_BREAKPOINT_OFFSET (0)extern CORE_ADDR alpha_call_dummy_address PARAMS ((void));#define CALL_DUMMY_ADDRESS() alpha_call_dummy_address()/* Insert the specified number of args and function address   into a call sequence of the above form stored at DUMMYNAME.   We only have to set RA_REGNUM to the dummy breakpoint address   and T12_REGNUM (the `procedure value register') to the function address.  */#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p)    \{									\  CORE_ADDR bp_address = CALL_DUMMY_ADDRESS ();			\  if (bp_address == 0)							\    error ("no place to put call");					\  write_register (RA_REGNUM, bp_address);				\  write_register (T12_REGNUM, fun);					\}/* There's a mess in stack frame creation.  See comments in blockframe.c   near reference to INIT_FRAME_PC_FIRST.  */#define	INIT_FRAME_PC(fromleaf, prev)	/* nada */#define INIT_FRAME_PC_FIRST(fromleaf, prev) \  (prev)->pc = ((fromleaf) ? SAVED_PC_AFTER_CALL ((prev)->next) : \	      (prev)->next ? FRAME_SAVED_PC ((prev)->next) : read_pc ());/* Special symbol found in blocks associated with routines.  We can hang   alpha_extra_func_info_t's off of this.  */#define MIPS_EFI_SYMBOL_NAME "__GDB_EFI_INFO__"extern void ecoff_relocate_efi PARAMS ((struct symbol *, CORE_ADDR));/* Specific information about a procedure.   This overlays the ALPHA's PDR records,    alpharead.c (ab)uses this to save memory */typedef struct alpha_extra_func_info  {    long numargs;		/* number of args to procedure (was iopt) */    PDR pdr;			/* Procedure descriptor record */  } *alpha_extra_func_info_t;/* Define the extra_func_info that mipsread.c needs.   FIXME: We should define our own PDR interface, perhaps in a separate   header file. This would get rid of the <bfd.h> inclusion in all sources   and would abstract the mips/alpha interface from ecoff.  */#define mips_extra_func_info alpha_extra_func_info#define mips_extra_func_info_t alpha_extra_func_info_t#define EXTRA_FRAME_INFO \  int localoff; \  int pc_reg; \  alpha_extra_func_info_t proc_desc;#define INIT_EXTRA_FRAME_INFO(fromleaf, fci) init_extra_frame_info(fci)extern voidinit_extra_frame_info PARAMS ((struct frame_info *));#define	PRINT_EXTRA_FRAME_INFO(fi) \  { \    if (fi && fi->proc_desc && fi->proc_desc->pdr.framereg < NUM_REGS) \      printf_filtered (" frame pointer is at %s+%ld\n", \                       REGISTER_NAME (fi->proc_desc->pdr.framereg), \                                 fi->proc_desc->pdr.frameoffset); \  }/* It takes two values to specify a frame on the ALPHA.  Sigh.   In fact, at the moment, the *PC* is the primary value that sets up   a frame.  The PC is looked up to see what function it's in; symbol   information from that function tells us which register is the frame   pointer base, and what offset from there is the "virtual frame pointer".   (This is usually an offset from SP.)  FIXME -- this should be cleaned   up so that the primary value is the SP, and the PC is used to disambiguate   multiple functions with the same SP that are at different stack levels. */#define SETUP_ARBITRARY_FRAME(argc, argv) setup_arbitrary_frame (argc, argv)extern struct frame_info *setup_arbitrary_frame PARAMS ((int, CORE_ADDR *));/* This is used by heuristic_proc_start.  It should be shot it the head.  */#ifndef VM_MIN_ADDRESS#define VM_MIN_ADDRESS (CORE_ADDR)0x120000000#endif/* If PC is in a shared library trampoline code, return the PC   where the function itself actually starts.  If not, return 0.  */#define SKIP_TRAMPOLINE_CODE(pc)  find_solib_trampoline_target (pc)/* If the current gcc for for this target does not produce correct debugging   information for float parameters, both prototyped and unprototyped, then   define this macro.  This forces gdb to  always assume that floats are   passed as doubles and then converted in the callee.   For the alpha, it appears that the debug info marks the parameters as   floats regardless of whether the function is prototyped, but the actual   values are always passed in as doubles.  Thus by setting this to 1, both   types of calls will work. */#define COERCE_FLOAT_TO_DOUBLE(formal, actual) (1)/* Return TRUE if procedure descriptor PROC is a procedure descriptor   that refers to a dynamically generated sigtramp function.   OSF/1 doesn't use dynamic sigtramp functions, so this is always   FALSE.  */#define PROC_DESC_IS_DYN_SIGTRAMP(proc)	(0)#define SET_PROC_DESC_IS_DYN_SIGTRAMP(proc)/* If PC is inside a dynamically generated sigtramp function, return   how many bytes the program counter is beyond the start of that   function.  Otherwise, return a negative value.   OSF/1 doesn't use dynamic sigtramp functions, so this always   returns -1.  */#define DYNAMIC_SIGTRAMP_OFFSET(pc)	(-1)/* Translate a signal handler frame into the address of the sigcontext   structure.  */#define SIGCONTEXT_ADDR(frame) \  (read_memory_integer ((frame)->next ? frame->next->frame : frame->frame, 8))/* If FRAME refers to a sigtramp frame, return the address of the next   frame.  */#define FRAME_PAST_SIGTRAMP_FRAME(frame, pc) \  (alpha_osf_skip_sigtramp_frame (frame, pc))extern CORE_ADDR alpha_osf_skip_sigtramp_frame PARAMS ((struct frame_info *, CORE_ADDR));#endif /* TM_ALPHA_H */

⌨️ 快捷键说明

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