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

📄 tm-convex.h

📁 arm-linux-gcc编译器
💻 H
📖 第 1 页 / 共 2 页
字号:
/* OBSOLETE /* Definitions to make GDB run on Convex Unix (4bsd) *//* OBSOLETE    Copyright 1989, 1991, 1993 Free Software Foundation, Inc. *//* OBSOLETE  *//* OBSOLETE This file is part of GDB. *//* OBSOLETE  *//* OBSOLETE This program is free software; you can redistribute it and/or modify *//* OBSOLETE it under the terms of the GNU General Public License as published by *//* OBSOLETE the Free Software Foundation; either version 2 of the License, or *//* OBSOLETE (at your option) any later version. *//* OBSOLETE  *//* OBSOLETE This program is distributed in the hope that it will be useful, *//* OBSOLETE but WITHOUT ANY WARRANTY; without even the implied warranty of *//* OBSOLETE MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the *//* OBSOLETE GNU General Public License for more details. *//* OBSOLETE  *//* OBSOLETE You should have received a copy of the GNU General Public License *//* OBSOLETE along with this program; if not, write to the Free Software *//* OBSOLETE Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  *x/ *//* OBSOLETE  *//* OBSOLETE #define TARGET_BYTE_ORDER BIG_ENDIAN *//* OBSOLETE  *//* OBSOLETE /* There is come problem with the debugging symbols generated by the *//* OBSOLETE    compiler such that the debugging symbol for the first line of a *//* OBSOLETE    function overlap with the function prologue.  *x/ *//* OBSOLETE #define PROLOGUE_FIRSTLINE_OVERLAP *//* OBSOLETE  *//* OBSOLETE /* When convex pcc says CHAR or SHORT, it provides the correct address.  *x/ *//* OBSOLETE  *//* OBSOLETE #define BELIEVE_PCC_PROMOTION 1 *//* OBSOLETE  *//* OBSOLETE /* Symbol types to ignore.  *x/ *//* OBSOLETE /* 0xc4 is N_MONPT.  Use the numeric value for the benefit of people *//* OBSOLETE    with (rather) old OS's.  *x/ *//* OBSOLETE #define IGNORE_SYMBOL(TYPE) \ *//* OBSOLETE     (((TYPE) & ~N_EXT) == N_TBSS       \ *//* OBSOLETE      || ((TYPE) & ~N_EXT) == N_TDATA   \ *//* OBSOLETE      || ((TYPE) & ~N_EXT) == 0xc4) *//* OBSOLETE  *//* OBSOLETE /* Offset from address of function to start of its code. *//* OBSOLETE    Zero on most machines.  *x/ *//* OBSOLETE  *//* OBSOLETE #define FUNCTION_START_OFFSET 0 *//* OBSOLETE  *//* OBSOLETE /* Advance PC across any function entry prologue instructions *//* OBSOLETE    to reach some "real" code. *//* OBSOLETE    Convex prolog is: *//* OBSOLETE        [sub.w #-,sp]                in one of 3 possible sizes *//* OBSOLETE        [mov psw,-           fc/vc main program prolog *//* OBSOLETE         and #-,-              (skip it because the "mov psw" saves the *//* OBSOLETE     mov -,psw]                 T bit, so continue gets a surprise trap) *//* OBSOLETE        [and #-,sp]          fc/vc O2 main program prolog *//* OBSOLETE        [ld.- -(ap),-]               pcc/gcc register arg loads *//* OBSOLETE *x/ *//* OBSOLETE  *//* OBSOLETE extern CORE_ADDR convex_skip_prologue PARAMS ((CORE_ADDR pc)); *//* OBSOLETE #define SKIP_PROLOGUE(pc) (convex_skip_prologue (pc)) *//* OBSOLETE  *//* OBSOLETE /* Immediately after a function call, return the saved pc. *//* OBSOLETE    (ignore frame and return *$sp so we can handle both calls and callq) *x/ *//* OBSOLETE  *//* OBSOLETE #define SAVED_PC_AFTER_CALL(frame) \ *//* OBSOLETE     read_memory_integer (read_register (SP_REGNUM), 4) *//* OBSOLETE  *//* OBSOLETE /* Address of end of stack space. *//* OBSOLETE    This is ((USRSTACK + 0xfff) & -0x1000)) from <convex/vmparam.h> but *//* OBSOLETE    that expression depends on the kernel version; instead, fetch a *//* OBSOLETE    page-zero pointer and get it from that.  This will be invalid if *//* OBSOLETE    they ever change the way bkpt signals are delivered.  *x/ *//* OBSOLETE  *//* OBSOLETE #define STACK_END_ADDR (0xfffff000 & *(unsigned *) 0x80000050) *//* OBSOLETE  *//* OBSOLETE /* User-mode traps push an extended rtn block, *//* OBSOLETE    then fault with one of the following PCs *x/ *//* OBSOLETE  *//* OBSOLETE #define is_trace_pc(pc)  ((unsigned) ((pc) - (*(int *) 0x80000040)) <= 4) *//* OBSOLETE #define is_arith_pc(pc)  ((unsigned) ((pc) - (*(int *) 0x80000044)) <= 4) *//* OBSOLETE #define is_break_pc(pc)  ((unsigned) ((pc) - (*(int *) 0x80000050)) <= 4) *//* OBSOLETE  *//* OBSOLETE /* We need to manipulate trap bits in the psw *x/ *//* OBSOLETE  *//* OBSOLETE #define PSW_TRAP_FLAGS      0x69670000 *//* OBSOLETE #define PSW_T_BIT   0x08000000 *//* OBSOLETE #define PSW_S_BIT   0x01000000 *//* OBSOLETE  *//* OBSOLETE /* Stack grows downward.  *x/ *//* OBSOLETE  *//* OBSOLETE #define INNER_THAN(lhs,rhs) ((lhs) < (rhs)) *//* OBSOLETE  *//* OBSOLETE /* Sequence of bytes for breakpoint instruction. (bkpt)  *x/ *//* OBSOLETE  *//* OBSOLETE #define BREAKPOINT {0x7d,0x50} *//* OBSOLETE  *//* OBSOLETE /* Amount PC must be decremented by after a breakpoint. *//* OBSOLETE    This is often the number of bytes in BREAKPOINT but not always. *//* OBSOLETE    (The break PC needs to be decremented by 2, but we do it when the *//* OBSOLETE    break frame is recognized and popped.  That way gdb can tell breaks *//* OBSOLETE    from trace traps with certainty.) *x/ *//* OBSOLETE  *//* OBSOLETE #define DECR_PC_AFTER_BREAK 0 *//* OBSOLETE  *//* OBSOLETE /* Say how long (ordinary) registers are.  This is a piece of bogosity *//* OBSOLETE    used in push_word and a few other places; REGISTER_RAW_SIZE is the *//* OBSOLETE    real way to know how big a register is.  *x/ *//* OBSOLETE  *//* OBSOLETE #define REGISTER_SIZE 8 *//* OBSOLETE  *//* OBSOLETE /* Number of machine registers *x/ *//* OBSOLETE  *//* OBSOLETE #define NUM_REGS 26 *//* OBSOLETE  *//* OBSOLETE /* Initializer for an array of names of registers. *//* OBSOLETE    There should be NUM_REGS strings in this initializer.  *x/ *//* OBSOLETE  *//* OBSOLETE #define REGISTER_NAMES {"pc","psw","fp","ap","a5","a4","a3","a2","a1","sp",\ *//* OBSOLETE                     "s7","s6","s5","s4","s3","s2","s1","s0",\ *//* OBSOLETE                     "S7","S6","S5","S4","S3","S2","S1","S0"} *//* OBSOLETE  *//* OBSOLETE /* Register numbers of various important registers. *//* OBSOLETE    Note that some of these values are "real" register numbers, *//* OBSOLETE    and correspond to the general registers of the machine, *//* OBSOLETE    and some are "phony" register numbers which are too large *//* OBSOLETE    to be actual register numbers as far as the user is concerned *//* OBSOLETE    but do serve to get the desired values when passed to read_register.  *x/ *//* OBSOLETE  *//* OBSOLETE #define S0_REGNUM 25                /* the real S regs *x/ *//* OBSOLETE #define S7_REGNUM 18 *//* OBSOLETE #define s0_REGNUM 17                /* low-order halves of S regs *x/ *//* OBSOLETE #define s7_REGNUM 10 *//* OBSOLETE #define SP_REGNUM 9                 /* A regs *x/ *//* OBSOLETE #define A1_REGNUM 8 *//* OBSOLETE #define A5_REGNUM 4 *//* OBSOLETE #define AP_REGNUM 3 *//* OBSOLETE #define FP_REGNUM 2         /* Contains address of executing stack frame *x/ *//* OBSOLETE #define PS_REGNUM 1         /* Contains processor status *x/ *//* OBSOLETE #define PC_REGNUM 0         /* Contains program counter *x/ *//* OBSOLETE  *//* OBSOLETE /* convert dbx stab register number (from `r' declaration) to a gdb REGNUM *x/ *//* OBSOLETE  *//* OBSOLETE #define STAB_REG_TO_REGNUM(value) \ *//* OBSOLETE       ((value) < 8 ? S0_REGNUM - (value) : SP_REGNUM - ((value) - 8)) *//* OBSOLETE  *//* OBSOLETE /* Vector register numbers, not handled as ordinary regs. *//* OBSOLETE    They are treated as convenience variables whose values are read *//* OBSOLETE    from the inferior when needed.  *x/ *//* OBSOLETE  *//* OBSOLETE #define V0_REGNUM 0 *//* OBSOLETE #define V7_REGNUM 7 *//* OBSOLETE #define VM_REGNUM 8 *//* OBSOLETE #define VS_REGNUM 9 *//* OBSOLETE #define VL_REGNUM 10 *//* OBSOLETE  *//* OBSOLETE /* Total amount of space needed to store our copies of the machine's *//* OBSOLETE    register state, the array `registers'.  *x/ *//* OBSOLETE #define REGISTER_BYTES (4*10 + 8*8) *//* OBSOLETE  *//* OBSOLETE /* Index within `registers' of the first byte of the space for *//* OBSOLETE    register N. *//* OBSOLETE    NB: must match structure of struct syscall_context for correct operation *x/ *//* OBSOLETE  *//* OBSOLETE #define REGISTER_BYTE(N) ((N) < s7_REGNUM ? 4*(N) : \ *//* OBSOLETE                       (N) < S7_REGNUM ? 44 + 8 * ((N)-s7_REGNUM) : \ *//* OBSOLETE                                         40 + 8 * ((N)-S7_REGNUM)) *//* OBSOLETE  *//* OBSOLETE /* Number of bytes of storage in the actual machine representation *//* OBSOLETE    for register N. *x/ *//* OBSOLETE  *//* OBSOLETE #define REGISTER_RAW_SIZE(N) ((N) < S7_REGNUM ? 4 : 8) *//* OBSOLETE  *//* OBSOLETE /* Number of bytes of storage in the program's representation *//* OBSOLETE    for register N.   *x/ *//* OBSOLETE  *//* OBSOLETE #define REGISTER_VIRTUAL_SIZE(N) REGISTER_RAW_SIZE(N) *//* OBSOLETE  *//* OBSOLETE /* Largest value REGISTER_RAW_SIZE can have.  *x/ *//* OBSOLETE  *//* OBSOLETE #define MAX_REGISTER_RAW_SIZE 8 *//* OBSOLETE  *//* OBSOLETE /* Largest value REGISTER_VIRTUAL_SIZE can have.  *x/ *//* OBSOLETE  *//* OBSOLETE #define MAX_REGISTER_VIRTUAL_SIZE 8 *//* OBSOLETE  *//* OBSOLETE /* Return the GDB type object for the "standard" data type *//* OBSOLETE    of data in register N.  *x/ *//* OBSOLETE  *//* OBSOLETE #define REGISTER_VIRTUAL_TYPE(N) \ *//* OBSOLETE    ((N) < S7_REGNUM ? builtin_type_int : builtin_type_long_long) *//* OBSOLETE  *//* OBSOLETE /* Store the address of the place in which to copy the structure the *//* OBSOLETE    subroutine will return.  This is called from call_function. *x/ *//* OBSOLETE  *//* OBSOLETE #define STORE_STRUCT_RETURN(ADDR, SP) \ *//* OBSOLETE   { write_register (A1_REGNUM, (ADDR)); } *//* OBSOLETE  *//* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state *//* OBSOLETE    a function return value of type TYPE, and copy that, in virtual format, *//* OBSOLETE    into VALBUF.  *x/ *//* OBSOLETE  *//* OBSOLETE #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \ *//* OBSOLETE   memcpy (VALBUF, &((char *) REGBUF) [REGISTER_BYTE (S0_REGNUM) + \ *//* OBSOLETE                          8 - TYPE_LENGTH (TYPE)],\ *//* OBSOLETE      TYPE_LENGTH (TYPE)) *//* OBSOLETE  *//* OBSOLETE /* Write into appropriate registers a function return value *//* OBSOLETE    of type TYPE, given in virtual format.  *x/ *//* OBSOLETE  *//* OBSOLETE #define STORE_RETURN_VALUE(TYPE,VALBUF) \ *//* OBSOLETE     write_register_bytes (REGISTER_BYTE (S0_REGNUM), VALBUF, 8) *//* OBSOLETE  *//* OBSOLETE /* Extract from an array REGBUF containing the (raw) register state *//* OBSOLETE    the address in which a function should return its structure value, *//* OBSOLETE    as a CORE_ADDR (or an expression that can be used as one).  *x/ *//* OBSOLETE  *//* OBSOLETE #define EXTRACT_STRUCT_VALUE_ADDRESS(REGBUF) \ *//* OBSOLETE     (*(int *) & ((char *) REGBUF) [REGISTER_BYTE (s0_REGNUM)]) *//* OBSOLETE  *//* OBSOLETE /* Define trapped internal variable hooks to read and write *//* OBSOLETE    vector and communication registers.  *x/ *//* OBSOLETE  *//* OBSOLETE #define IS_TRAPPED_INTERNALVAR is_trapped_internalvar *//* OBSOLETE #define VALUE_OF_TRAPPED_INTERNALVAR value_of_trapped_internalvar *//* OBSOLETE #define SET_TRAPPED_INTERNALVAR set_trapped_internalvar *//* OBSOLETE  *//* OBSOLETE extern struct value *value_of_trapped_internalvar (); *//* OBSOLETE  *//* OBSOLETE /* Hooks to read data from soff exec and core files, *//* OBSOLETE    and to describe the files.  *x/ *//* OBSOLETE  *//* OBSOLETE #define FILES_INFO_HOOK print_maps *//* OBSOLETE  *//* OBSOLETE /* Hook to call to print a typeless integer value, normally printed in decimal. *//* OBSOLETE    For convex, use hex instead if the number looks like an address.  *x/ *//* OBSOLETE  *//* OBSOLETE #define PRINT_TYPELESS_INTEGER decout *//* OBSOLETE  *//* OBSOLETE /* For the native compiler, variables for a particular lexical context *//* OBSOLETE    are listed after the beginning LBRAC instead of before in the *//* OBSOLETE    executables list of symbols.  Using "gcc_compiled." to distinguish *//* OBSOLETE    between GCC and native compiler doesn't work on Convex because the *//* OBSOLETE    linker sorts the symbols to put "gcc_compiled." in the wrong place. *//* OBSOLETE    desc is nonzero for native, zero for gcc.   *x/ *//* OBSOLETE #define VARIABLES_INSIDE_BLOCK(desc, gcc_p) (desc != 0) *//* OBSOLETE  *//* OBSOLETE /* Pcc occaisionally puts an SO where there should be an SOL.   *x/ *//* OBSOLETE #define PCC_SOL_BROKEN */

⌨️ 快捷键说明

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