diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-04-05 14:49:29 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-04-05 14:49:29 +0000 |
commit | 4a1968f4944c8368cf51943e8e3fb02a9bc324a3 (patch) | |
tree | 1f0da3d1a7e639e8780445ea2b645aed86f4e190 | |
parent | e66457fbf3726420435dc962c190c8ab9933a78b (diff) | |
download | fsf-binutils-gdb-4a1968f4944c8368cf51943e8e3fb02a9bc324a3.zip fsf-binutils-gdb-4a1968f4944c8368cf51943e8e3fb02a9bc324a3.tar.gz fsf-binutils-gdb-4a1968f4944c8368cf51943e8e3fb02a9bc324a3.tar.bz2 |
Obsolete a29k-*-* host and a29k-*-sym1* and a29k-*-kern* targets.
-rw-r--r-- | gdb/ChangeLog | 19 | ||||
-rw-r--r-- | gdb/Makefile.in | 5 | ||||
-rw-r--r-- | gdb/NEWS | 1 | ||||
-rw-r--r-- | gdb/TODO | 11 | ||||
-rw-r--r-- | gdb/config/a29k/a29k-kern.mt | 26 | ||||
-rw-r--r-- | gdb/config/a29k/nm-ultra3.h | 56 | ||||
-rw-r--r-- | gdb/config/a29k/tm-ultra3.h | 454 | ||||
-rw-r--r-- | gdb/config/a29k/ultra3.mh | 25 | ||||
-rw-r--r-- | gdb/config/a29k/ultra3.mt | 12 | ||||
-rw-r--r-- | gdb/config/a29k/xm-ultra3.h | 106 | ||||
-rw-r--r-- | gdb/configure.host | 2 | ||||
-rw-r--r-- | gdb/configure.tgt | 4 | ||||
-rw-r--r-- | gdb/ultra3-nat.c | 726 | ||||
-rw-r--r-- | gdb/ultra3-xdep.c | 276 |
14 files changed, 874 insertions, 849 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3d0a2fc..47b1d4c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,22 @@ +2001-04-04 Andrew Cagney <ac131313@redhat.com> + + Obsolete a29k-*-* host and a29k-*-sym1* and a29k-*-kern* targets. + * configure.tgt (a29k-*-sym1*, a29k-*-kern*): Obsolete. + * configure.host (a29k-*-*): Obsolete. + * Makefile.in (ALLDEPFILES): Remove ultra3-nat.c and + ultra3-xdep.c. + (ultra3-nat.o, ultra3-xdep.o): Obsolete. + * config/a29k/tm-ultra3.h: Obsolete. + * config/a29k/ultra3.mt: Obsolete. + * config/a29k/ultra3.mh: Obsolete. + * config/a29k/nm-ultra3.h: Obsolete. + * config/a29k/xm-ultra3.h: Obsolete. + * ultra3-xdep.c: Obsolete. + * ultra3-nat.c: Obsolete. + * config/a29k/a29k-kern.mt: Obsolete. + * NEWS: Update. + * TODO: Update. + Wed Apr 4 21:48:42 2001 Christopher Faylor <cgf@cygnus.com> * main.c: Remove windows.h use. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index c10ca50..f7abfd8 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1165,7 +1165,6 @@ ALLDEPFILES = 29k-share/udi/udip2soc.c 29k-share/udi/udr.c \ sh-tdep.c solib.c sparc-nat.c \ sparc-tdep.c sparcl-tdep.c sun3-nat.c sun386-nat.c \ symm-tdep.c symm-nat.c \ - ultra3-nat.c ultra3-xdep.c \ vax-tdep.c \ vx-share/xdr_ld.c vx-share/xdr_ptrace.c vx-share/xdr_rdb.c \ win32-nat.c \ @@ -1982,9 +1981,9 @@ typeprint.o: typeprint.c $(defs_h) $(expression_h) $(gdbcmd_h) \ $(gdbcore_h) $(gdbtypes_h) language.h $(symtab_h) target.h \ $(value_h) gdb_string.h -ultra3-nat.o: ultra3-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h) +# OBSOLETE ultra3-nat.o: ultra3-nat.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h) -ultra3-xdep.o: ultra3-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h) +# OBSOLETE ultra3-xdep.o: ultra3-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h) # OBSOLETE umax-xdep.o: umax-xdep.c $(defs_h) $(gdbcore_h) $(inferior_h) $(regcache_h) @@ -20,6 +20,7 @@ Most ns32k hosts and targets ns32k-*-mach3* ns32k-umax-* ns32k-utek-sysv* ns32k-utek-* TI TMS320C80 tic80-*-* WDC 65816 w65-*-* +Ultracomputer (29K) running Sym1 a29k-nyu-sym1 a29k-*-kern* stuff.c (Program to stuff files into a specially prepared space in kdb) kdb-start.c (Main loop for the standalone kernel debugger) @@ -193,8 +193,9 @@ Steps: m68*-*bug-* m68k - (monitor) m68*-monitor-* m68k - (monitor) m68*-est-* m68k - (monitor) - a29k-*-* a29k ultra3 - - a29k-*-sym1* a29k - ultra3 + a29k-*-* a29k ultra3 - yes + a29k-*-sym1* a29k - ultra3 yes + a29k-*-kern* a29k - a29k-kern yes powerpcle-*-solaris* powerpc solaris solaris powerpcle-*-cygwin* powerpc cygwin cygwin powerpc-*-netware* powerpc - ppc-nw @@ -386,6 +387,12 @@ to any specific release. -- +Investigate changing --target=a29k-amd-udi to a29k-*-coff* and +rationalize *.mt files. The got-ya is in remote-eb.c - it has its own +custom tty manipulation - it should be using the serial object. + +-- + Rename read_register{,_pid}() to read_unsigned_register{,_pid}(). -- diff --git a/gdb/config/a29k/a29k-kern.mt b/gdb/config/a29k/a29k-kern.mt index f1a2e52..be6f567 100644 --- a/gdb/config/a29k/a29k-kern.mt +++ b/gdb/config/a29k/a29k-kern.mt @@ -1,13 +1,13 @@ -# Target: Remote AMD 29000 that runs Unix kernel on NYU Ultra3 processor board - -# This builds a gdb that should run on a host (we use sun3os4) that -# then communicates over the serial line to either an Adapt or MiniMon, -# for use in debugging Unix kernels. -# As compared to ordinary remote 29K debugging, this changes the register -# numbering a bit, to hold kernel regs, and adds support for looking at -# the upage. - -TDEPFILES= a29k-tdep.o remote-mm.o remote-adapt.o -TM_FILE= tm-ultra3.h - -MT_CFLAGS = -DKERNEL_DEBUGGING -DNO_HIF_SUPPORT +# OBSOLETE # Target: Remote AMD 29000 that runs Unix kernel on NYU Ultra3 processor board +# OBSOLETE +# OBSOLETE # This builds a gdb that should run on a host (we use sun3os4) that +# OBSOLETE # then communicates over the serial line to either an Adapt or MiniMon, +# OBSOLETE # for use in debugging Unix kernels. +# OBSOLETE # As compared to ordinary remote 29K debugging, this changes the register +# OBSOLETE # numbering a bit, to hold kernel regs, and adds support for looking at +# OBSOLETE # the upage. +# OBSOLETE +# OBSOLETE TDEPFILES= a29k-tdep.o remote-mm.o remote-adapt.o +# OBSOLETE TM_FILE= tm-ultra3.h +# OBSOLETE +# OBSOLETE MT_CFLAGS = -DKERNEL_DEBUGGING -DNO_HIF_SUPPORT diff --git a/gdb/config/a29k/nm-ultra3.h b/gdb/config/a29k/nm-ultra3.h index c15efe6..330319f 100644 --- a/gdb/config/a29k/nm-ultra3.h +++ b/gdb/config/a29k/nm-ultra3.h @@ -1,28 +1,28 @@ -/* Host definitions for GDB running on an a29k NYU Ultracomputer - Copyright 1986, 1987, 1989, 1991, 1992, 1993 - Free Software Foundation, Inc. - Contributed by David Wood (wood@lab.ultra.nyu.edu). - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the 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 of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* If we ever *do* end up using the standard fetch_inferior_registers, - this is the right value for U_REGS_OFFSET. */ -#define U_REGS_OFFSET 0 - -/* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ -#define FETCH_INFERIOR_REGISTERS +/* OBSOLETE /* Host definitions for GDB running on an a29k NYU Ultracomputer */ +/* OBSOLETE Copyright 1986, 1987, 1989, 1991, 1992, 1993 */ +/* OBSOLETE Free Software Foundation, Inc. */ +/* OBSOLETE Contributed by David Wood (wood@lab.ultra.nyu.edu). */ +/* 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, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE /* If we ever *do* end up using the standard fetch_inferior_registers, */ +/* OBSOLETE this is the right value for U_REGS_OFFSET. */ */ +/* OBSOLETE #define U_REGS_OFFSET 0 */ +/* OBSOLETE */ +/* OBSOLETE /* Override copies of {fetch,store}_inferior_registers in infptrace.c. */ */ +/* OBSOLETE #define FETCH_INFERIOR_REGISTERS */ diff --git a/gdb/config/a29k/tm-ultra3.h b/gdb/config/a29k/tm-ultra3.h index 3641686..dbf01fd 100644 --- a/gdb/config/a29k/tm-ultra3.h +++ b/gdb/config/a29k/tm-ultra3.h @@ -1,227 +1,227 @@ -/* Parameters for NYU Ultracomputer 29000 target, for GDB, the GNU debugger. - Copyright 1990, 1991, 1993 Free Software Foundation, Inc. - Contributed by David Wood @ New York University (wood@nyu.edu). - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the 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 of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* This file includes tm-a29k.h, but predefines REGISTER_NAMES and - related macros. The file supports a a29k running our flavor of - Unix on our Ultra3 PE Boards. */ - -/* Byte order is configurable, but this machine runs big-endian. */ -#define TARGET_BYTE_ORDER BIG_ENDIAN - -/* Initializer for an array of names of registers. - There should be NUM_REGS strings in this initializer. - */ -#define NUM_REGS (EXO_REGNUM + 1) - -#define REGISTER_NAMES { \ - "gr1", \ - "gr64", "gr65", "gr66", "gr67", "gr68", "gr69", "gr70", "gr71", "gr72", \ - "gr73", "gr74", "gr75", "gr76", "gr77", "gr78", "gr79", "gr80", "gr81", \ - "gr82", "gr83", "gr84", "gr85", "gr86", "gr87", "gr88", "gr89", "gr90", \ - "gr91", "gr92", "gr93", "gr94", "gr95", \ - "gr96", "gr97", "gr98", "gr99", "gr100", "gr101", "gr102", "gr103", "gr104", \ - "gr105", "gr106", "gr107", "gr108", "gr109", "gr110", "gr111", "gr112", \ - "gr113", "gr114", "gr115", "gr116", "gr117", "gr118", "gr119", "gr120", \ - "gr121", "gr122", "gr123", "gr124", "gr125", "gr126", "gr127", \ - "lr0", "lr1", "lr2", "lr3", "lr4", "lr5", "lr6", "lr7", "lr8", "lr9", \ - "lr10", "lr11", "lr12", "lr13", "lr14", "lr15", "lr16", "lr17", "lr18", \ - "lr19", "lr20", "lr21", "lr22", "lr23", "lr24", "lr25", "lr26", "lr27", \ - "lr28", "lr29", "lr30", "lr31", "lr32", "lr33", "lr34", "lr35", "lr36", \ - "lr37", "lr38", "lr39", "lr40", "lr41", "lr42", "lr43", "lr44", "lr45", \ - "lr46", "lr47", "lr48", "lr49", "lr50", "lr51", "lr52", "lr53", "lr54", \ - "lr55", "lr56", "lr57", "lr58", "lr59", "lr60", "lr61", "lr62", "lr63", \ - "lr64", "lr65", "lr66", "lr67", "lr68", "lr69", "lr70", "lr71", "lr72", \ - "lr73", "lr74", "lr75", "lr76", "lr77", "lr78", "lr79", "lr80", "lr81", \ - "lr82", "lr83", "lr84", "lr85", "lr86", "lr87", "lr88", "lr89", "lr90", \ - "lr91", "lr92", "lr93", "lr94", "lr95", "lr96", "lr97", "lr98", "lr99", \ - "lr100", "lr101", "lr102", "lr103", "lr104", "lr105", "lr106", "lr107", \ - "lr108", "lr109", "lr110", "lr111", "lr112", "lr113", "lr114", "lr115", \ - "lr116", "lr117", "lr118", "lr119", "lr120", "lr121", "lr122", "lr123", \ - "lr124", "lr125", "lr126", "lr127", \ - "vab", "ops", "cps", "cfg", "cha", "chd", "chc", "rbp", "tmc", "tmr", \ - "pc0", "pc1", "pc2", "mmu", "lru", \ - "ipc", "ipa", "ipb", "q", "alu", "bp", "fc", "cr", \ - "fpe", "int", "fps", "exo" } - - -#ifdef KERNEL_DEBUGGING -#define PADDR_U_REGNUM 22 /* gr86 */ -#define RETURN_REGNUM GR64_REGNUM -#else -#define RETURN_REGNUM GR96_REGNUM -#endif /* KERNEL_DEBUGGING */ - - -/* Should rename all GR96_REGNUM to RETURN_REGNUM */ -#define GR1_REGNUM (0) -#define GR64_REGNUM 1 -#define GR96_REGNUM (GR64_REGNUM + 32) -/* This needs to be the memory stack pointer, not the register stack pointer, - to make call_function work right. */ -#define SP_REGNUM MSP_REGNUM - -#define FP_REGNUM (LR0_REGNUM + 1) /* lr1 */ -/* Large Return Pointer */ -#define LRP_REGNUM (123 - 96 + RETURN_REGNUM) -/* Static link pointer */ -#define SLP_REGNUM (124 - 96 + RETURN_REGNUM) -/* Memory Stack Pointer. */ -#define MSP_REGNUM (125 - 96 + RETURN_REGNUM) -/* Register allocate bound. */ -#define RAB_REGNUM (126 - 96 + RETURN_REGNUM) -/* Register Free Bound. */ -#define RFB_REGNUM (127 - 96 + RETURN_REGNUM) -/* Register Stack Pointer. */ -#define RSP_REGNUM GR1_REGNUM -#define LR0_REGNUM ( 32 + GR96_REGNUM) - -/* Protected Special registers */ -#define VAB_REGNUM (LR0_REGNUM + 128) -#define OPS_REGNUM (VAB_REGNUM + 1) -#define CPS_REGNUM (VAB_REGNUM + 2) -#define CFG_REGNUM (VAB_REGNUM + 3) -#define CHA_REGNUM (VAB_REGNUM + 4) -#define CHD_REGNUM (VAB_REGNUM + 5) -#define CHC_REGNUM (VAB_REGNUM + 6) -#define RBP_REGNUM (VAB_REGNUM + 7) -#define TMC_REGNUM (VAB_REGNUM + 8) -#define TMR_REGNUM (VAB_REGNUM + 9) -#define NPC_REGNUM (VAB_REGNUM + 10) /* pc0 */ -#define PC_REGNUM (VAB_REGNUM + 11) /* pc1 */ -#define PC2_REGNUM (VAB_REGNUM + 12) /* pc2 */ -#define MMU_REGNUM (VAB_REGNUM + 13) -#define LRU_REGNUM (VAB_REGNUM + 14) - /* Register sequence gap */ -/* Unprotected Special registers */ -#define IPC_REGNUM (LRU_REGNUM + 1) -#define IPA_REGNUM (IPC_REGNUM + 1) -#define IPB_REGNUM (IPC_REGNUM + 2) -#define Q_REGNUM (IPC_REGNUM + 3) -#define ALU_REGNUM (IPC_REGNUM + 4) -#define PS_REGNUM ALU_REGNUM -#define BP_REGNUM (IPC_REGNUM + 5) -#define FC_REGNUM (IPC_REGNUM + 6) -#define CR_REGNUM (IPC_REGNUM + 7) - /* Register sequence gap */ -#define FPE_REGNUM (CR_REGNUM + 1) -#define INT_REGNUM (FPE_REGNUM + 1) -#define FPS_REGNUM (FPE_REGNUM + 2) - /* Register sequence gap */ -#define EXO_REGNUM (FPS_REGNUM + 1) - -/* Special register #x. */ -#define SR_REGNUM(x) \ - ((x) < 15 ? VAB_REGNUM + (x) \ - : (x) >= 128 && (x) < 136 ? IPC_REGNUM + (x-128) \ - : (x) >= 160 && (x) < 163 ? FPE_REGNUM + (x-160) \ - : (x) == 164 ? EXO_REGNUM \ - : (error ("Internal error in SR_REGNUM"), 0)) - -#ifndef KERNEL_DEBUGGING -/* - * This macro defines the register numbers (from REGISTER_NAMES) that - * are effectively unavailable to the user through ptrace(). It allows - * us to include the whole register set in REGISTER_NAMES (inorder to - * better support remote debugging). If it is used in - * fetch/store_inferior_registers() gdb will not complain about I/O errors - * on fetching these registers. If all registers in REGISTER_NAMES - * are available, then return false (0). - */ -#define CANNOT_STORE_REGISTER(regno) \ - (((regno)>=GR64_REGNUM && (regno)<GR64_REGNUM+32) || \ - ((regno)==VAB_REGNUM) || \ - ((regno)==OPS_REGNUM) || \ - ((regno)>=CFG_REGNUM && (regno)<=TMR_REGNUM) || \ - ((regno)==MMU_REGNUM) || \ - ((regno)==LRU_REGNUM) || \ - ((regno)>=ALU_REGNUM) || \ - ((regno)==CR_REGNUM) || \ - ((regno)==EXO_REGNUM)) -#define CANNOT_FETCH_REGISTER(regno) CANNOT_STORE_REGISTER(regno) -#endif /* KERNEL_DEBUGGING */ - -/* - * Converts an sdb register number to an internal gdb register number. - * Currently under gcc, gr96->0...gr128->31...lr0->32...lr127->159, or... - * gr64->0...gr95->31, lr0->32...lr127->159. - */ -#define SDB_REG_TO_REGNUM(value) (((value)<32) ? ((value)+RETURN_REGNUM) : \ - ((value)-32+LR0_REGNUM)) - -#ifdef KERNEL_DEBUGGING - /* ublock virtual address as defined in our sys/param.h */ - /* FIXME: Should get this from sys/param.h */ -#define UVADDR ((32*0x100000)-8192) -#endif - -/* - * Are we in sigtramp(), needed in infrun.c. Specific to ultra3, because - * we take off the leading '_'. - */ -#if !defined(KERNEL_DEBUGGING) -#ifdef SYM1 -#define IN_SIGTRAMP(pc, name) (name && STREQ ("sigtramp", name)) -#else -Need to define -IN_SIGTRAMP () for sym2. -#endif -#endif /* !KERNEL_DEBUGGING */ - -#include "a29k/tm-a29k.h" - -/**** The following are definitions that override those in tm-a29k.h ****/ - -/* This sequence of words is the instructions - mtsrim cr, 15 - loadm 0, 0, lr2, msp ; load first 16 words of arguments into registers - add msp, msp, 16 * 4 ; point to the remaining arguments - CONST_INSN: - const gr96,inf - consth gr96,inf - calli lr0, gr96 - aseq 0x40,gr1,gr1 ; nop - asneq 0x50,gr1,gr1 ; breakpoint - When KERNEL_DEBUGGIN is defined, msp -> gr93, gr96 -> gr64, - 7d -> 5d, 60 -> 40 - */ - -/* Position of the "const" instruction within CALL_DUMMY in bytes. */ -#undef CALL_DUMMY -#if TARGET_BYTE_ORDER == HOST_BYTE_ORDER -#ifdef KERNEL_DEBUGGING /* gr96 -> gr64 */ -#define CALL_DUMMY {0x0400870f, 0x3600825d, 0x155d5d40, 0x03ff40ff, \ - 0x02ff40ff, 0xc8008040, 0x70400101, 0x72500101} -#else -#define CALL_DUMMY {0x0400870f, 0x3600827d, 0x157d7d40, 0x03ff60ff, \ - 0x02ff60ff, 0xc8008060, 0x70400101, 0x72500101} -#endif /* KERNEL_DEBUGGING */ -#else /* Byte order differs. */ -you lose -#endif /* Byte order differs. */ - -#if !defined(KERNEL_DEBUGGING) -#ifdef SYM1 -#undef DECR_PC_AFTER_BREAK -#define DECR_PC_AFTER_BREAK 0 /* Sym1 kernel does the decrement */ -#else -->"ULTRA3 running other than sym1 OS" !; -#endif -#endif /* !KERNEL_DEBUGGING */ +/* OBSOLETE /* Parameters for NYU Ultracomputer 29000 target, for GDB, the GNU debugger. */ +/* OBSOLETE Copyright 1990, 1991, 1993 Free Software Foundation, Inc. */ +/* OBSOLETE Contributed by David Wood @ New York University (wood@nyu.edu). */ +/* 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, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE /* This file includes tm-a29k.h, but predefines REGISTER_NAMES and */ +/* OBSOLETE related macros. The file supports a a29k running our flavor of */ +/* OBSOLETE Unix on our Ultra3 PE Boards. */ */ +/* OBSOLETE */ +/* OBSOLETE /* Byte order is configurable, but this machine runs big-endian. */ */ +/* OBSOLETE #define TARGET_BYTE_ORDER BIG_ENDIAN */ +/* OBSOLETE */ +/* OBSOLETE /* Initializer for an array of names of registers. */ +/* OBSOLETE There should be NUM_REGS strings in this initializer. */ +/* OBSOLETE */ */ +/* OBSOLETE #define NUM_REGS (EXO_REGNUM + 1) */ +/* OBSOLETE */ +/* OBSOLETE #define REGISTER_NAMES { \ */ +/* OBSOLETE "gr1", \ */ +/* OBSOLETE "gr64", "gr65", "gr66", "gr67", "gr68", "gr69", "gr70", "gr71", "gr72", \ */ +/* OBSOLETE "gr73", "gr74", "gr75", "gr76", "gr77", "gr78", "gr79", "gr80", "gr81", \ */ +/* OBSOLETE "gr82", "gr83", "gr84", "gr85", "gr86", "gr87", "gr88", "gr89", "gr90", \ */ +/* OBSOLETE "gr91", "gr92", "gr93", "gr94", "gr95", \ */ +/* OBSOLETE "gr96", "gr97", "gr98", "gr99", "gr100", "gr101", "gr102", "gr103", "gr104", \ */ +/* OBSOLETE "gr105", "gr106", "gr107", "gr108", "gr109", "gr110", "gr111", "gr112", \ */ +/* OBSOLETE "gr113", "gr114", "gr115", "gr116", "gr117", "gr118", "gr119", "gr120", \ */ +/* OBSOLETE "gr121", "gr122", "gr123", "gr124", "gr125", "gr126", "gr127", \ */ +/* OBSOLETE "lr0", "lr1", "lr2", "lr3", "lr4", "lr5", "lr6", "lr7", "lr8", "lr9", \ */ +/* OBSOLETE "lr10", "lr11", "lr12", "lr13", "lr14", "lr15", "lr16", "lr17", "lr18", \ */ +/* OBSOLETE "lr19", "lr20", "lr21", "lr22", "lr23", "lr24", "lr25", "lr26", "lr27", \ */ +/* OBSOLETE "lr28", "lr29", "lr30", "lr31", "lr32", "lr33", "lr34", "lr35", "lr36", \ */ +/* OBSOLETE "lr37", "lr38", "lr39", "lr40", "lr41", "lr42", "lr43", "lr44", "lr45", \ */ +/* OBSOLETE "lr46", "lr47", "lr48", "lr49", "lr50", "lr51", "lr52", "lr53", "lr54", \ */ +/* OBSOLETE "lr55", "lr56", "lr57", "lr58", "lr59", "lr60", "lr61", "lr62", "lr63", \ */ +/* OBSOLETE "lr64", "lr65", "lr66", "lr67", "lr68", "lr69", "lr70", "lr71", "lr72", \ */ +/* OBSOLETE "lr73", "lr74", "lr75", "lr76", "lr77", "lr78", "lr79", "lr80", "lr81", \ */ +/* OBSOLETE "lr82", "lr83", "lr84", "lr85", "lr86", "lr87", "lr88", "lr89", "lr90", \ */ +/* OBSOLETE "lr91", "lr92", "lr93", "lr94", "lr95", "lr96", "lr97", "lr98", "lr99", \ */ +/* OBSOLETE "lr100", "lr101", "lr102", "lr103", "lr104", "lr105", "lr106", "lr107", \ */ +/* OBSOLETE "lr108", "lr109", "lr110", "lr111", "lr112", "lr113", "lr114", "lr115", \ */ +/* OBSOLETE "lr116", "lr117", "lr118", "lr119", "lr120", "lr121", "lr122", "lr123", \ */ +/* OBSOLETE "lr124", "lr125", "lr126", "lr127", \ */ +/* OBSOLETE "vab", "ops", "cps", "cfg", "cha", "chd", "chc", "rbp", "tmc", "tmr", \ */ +/* OBSOLETE "pc0", "pc1", "pc2", "mmu", "lru", \ */ +/* OBSOLETE "ipc", "ipa", "ipb", "q", "alu", "bp", "fc", "cr", \ */ +/* OBSOLETE "fpe", "int", "fps", "exo" } */ +/* OBSOLETE */ +/* OBSOLETE */ +/* OBSOLETE #ifdef KERNEL_DEBUGGING */ +/* OBSOLETE #define PADDR_U_REGNUM 22 /* gr86 */ */ +/* OBSOLETE #define RETURN_REGNUM GR64_REGNUM */ +/* OBSOLETE #else */ +/* OBSOLETE #define RETURN_REGNUM GR96_REGNUM */ +/* OBSOLETE #endif /* KERNEL_DEBUGGING */ */ +/* OBSOLETE */ +/* OBSOLETE */ +/* OBSOLETE /* Should rename all GR96_REGNUM to RETURN_REGNUM */ */ +/* OBSOLETE #define GR1_REGNUM (0) */ +/* OBSOLETE #define GR64_REGNUM 1 */ +/* OBSOLETE #define GR96_REGNUM (GR64_REGNUM + 32) */ +/* OBSOLETE /* This needs to be the memory stack pointer, not the register stack pointer, */ +/* OBSOLETE to make call_function work right. */ */ +/* OBSOLETE #define SP_REGNUM MSP_REGNUM */ +/* OBSOLETE */ +/* OBSOLETE #define FP_REGNUM (LR0_REGNUM + 1) /* lr1 */ */ +/* OBSOLETE /* Large Return Pointer */ */ +/* OBSOLETE #define LRP_REGNUM (123 - 96 + RETURN_REGNUM) */ +/* OBSOLETE /* Static link pointer */ */ +/* OBSOLETE #define SLP_REGNUM (124 - 96 + RETURN_REGNUM) */ +/* OBSOLETE /* Memory Stack Pointer. */ */ +/* OBSOLETE #define MSP_REGNUM (125 - 96 + RETURN_REGNUM) */ +/* OBSOLETE /* Register allocate bound. */ */ +/* OBSOLETE #define RAB_REGNUM (126 - 96 + RETURN_REGNUM) */ +/* OBSOLETE /* Register Free Bound. */ */ +/* OBSOLETE #define RFB_REGNUM (127 - 96 + RETURN_REGNUM) */ +/* OBSOLETE /* Register Stack Pointer. */ */ +/* OBSOLETE #define RSP_REGNUM GR1_REGNUM */ +/* OBSOLETE #define LR0_REGNUM ( 32 + GR96_REGNUM) */ +/* OBSOLETE */ +/* OBSOLETE /* Protected Special registers */ */ +/* OBSOLETE #define VAB_REGNUM (LR0_REGNUM + 128) */ +/* OBSOLETE #define OPS_REGNUM (VAB_REGNUM + 1) */ +/* OBSOLETE #define CPS_REGNUM (VAB_REGNUM + 2) */ +/* OBSOLETE #define CFG_REGNUM (VAB_REGNUM + 3) */ +/* OBSOLETE #define CHA_REGNUM (VAB_REGNUM + 4) */ +/* OBSOLETE #define CHD_REGNUM (VAB_REGNUM + 5) */ +/* OBSOLETE #define CHC_REGNUM (VAB_REGNUM + 6) */ +/* OBSOLETE #define RBP_REGNUM (VAB_REGNUM + 7) */ +/* OBSOLETE #define TMC_REGNUM (VAB_REGNUM + 8) */ +/* OBSOLETE #define TMR_REGNUM (VAB_REGNUM + 9) */ +/* OBSOLETE #define NPC_REGNUM (VAB_REGNUM + 10) /* pc0 */ */ +/* OBSOLETE #define PC_REGNUM (VAB_REGNUM + 11) /* pc1 */ */ +/* OBSOLETE #define PC2_REGNUM (VAB_REGNUM + 12) /* pc2 */ */ +/* OBSOLETE #define MMU_REGNUM (VAB_REGNUM + 13) */ +/* OBSOLETE #define LRU_REGNUM (VAB_REGNUM + 14) */ +/* OBSOLETE /* Register sequence gap */ */ +/* OBSOLETE /* Unprotected Special registers */ */ +/* OBSOLETE #define IPC_REGNUM (LRU_REGNUM + 1) */ +/* OBSOLETE #define IPA_REGNUM (IPC_REGNUM + 1) */ +/* OBSOLETE #define IPB_REGNUM (IPC_REGNUM + 2) */ +/* OBSOLETE #define Q_REGNUM (IPC_REGNUM + 3) */ +/* OBSOLETE #define ALU_REGNUM (IPC_REGNUM + 4) */ +/* OBSOLETE #define PS_REGNUM ALU_REGNUM */ +/* OBSOLETE #define BP_REGNUM (IPC_REGNUM + 5) */ +/* OBSOLETE #define FC_REGNUM (IPC_REGNUM + 6) */ +/* OBSOLETE #define CR_REGNUM (IPC_REGNUM + 7) */ +/* OBSOLETE /* Register sequence gap */ */ +/* OBSOLETE #define FPE_REGNUM (CR_REGNUM + 1) */ +/* OBSOLETE #define INT_REGNUM (FPE_REGNUM + 1) */ +/* OBSOLETE #define FPS_REGNUM (FPE_REGNUM + 2) */ +/* OBSOLETE /* Register sequence gap */ */ +/* OBSOLETE #define EXO_REGNUM (FPS_REGNUM + 1) */ +/* OBSOLETE */ +/* OBSOLETE /* Special register #x. */ */ +/* OBSOLETE #define SR_REGNUM(x) \ */ +/* OBSOLETE ((x) < 15 ? VAB_REGNUM + (x) \ */ +/* OBSOLETE : (x) >= 128 && (x) < 136 ? IPC_REGNUM + (x-128) \ */ +/* OBSOLETE : (x) >= 160 && (x) < 163 ? FPE_REGNUM + (x-160) \ */ +/* OBSOLETE : (x) == 164 ? EXO_REGNUM \ */ +/* OBSOLETE : (error ("Internal error in SR_REGNUM"), 0)) */ +/* OBSOLETE */ +/* OBSOLETE #ifndef KERNEL_DEBUGGING */ +/* OBSOLETE /* */ +/* OBSOLETE * This macro defines the register numbers (from REGISTER_NAMES) that */ +/* OBSOLETE * are effectively unavailable to the user through ptrace(). It allows */ +/* OBSOLETE * us to include the whole register set in REGISTER_NAMES (inorder to */ +/* OBSOLETE * better support remote debugging). If it is used in */ +/* OBSOLETE * fetch/store_inferior_registers() gdb will not complain about I/O errors */ +/* OBSOLETE * on fetching these registers. If all registers in REGISTER_NAMES */ +/* OBSOLETE * are available, then return false (0). */ +/* OBSOLETE */ */ +/* OBSOLETE #define CANNOT_STORE_REGISTER(regno) \ */ +/* OBSOLETE (((regno)>=GR64_REGNUM && (regno)<GR64_REGNUM+32) || \ */ +/* OBSOLETE ((regno)==VAB_REGNUM) || \ */ +/* OBSOLETE ((regno)==OPS_REGNUM) || \ */ +/* OBSOLETE ((regno)>=CFG_REGNUM && (regno)<=TMR_REGNUM) || \ */ +/* OBSOLETE ((regno)==MMU_REGNUM) || \ */ +/* OBSOLETE ((regno)==LRU_REGNUM) || \ */ +/* OBSOLETE ((regno)>=ALU_REGNUM) || \ */ +/* OBSOLETE ((regno)==CR_REGNUM) || \ */ +/* OBSOLETE ((regno)==EXO_REGNUM)) */ +/* OBSOLETE #define CANNOT_FETCH_REGISTER(regno) CANNOT_STORE_REGISTER(regno) */ +/* OBSOLETE #endif /* KERNEL_DEBUGGING */ */ +/* OBSOLETE */ +/* OBSOLETE /* */ +/* OBSOLETE * Converts an sdb register number to an internal gdb register number. */ +/* OBSOLETE * Currently under gcc, gr96->0...gr128->31...lr0->32...lr127->159, or... */ +/* OBSOLETE * gr64->0...gr95->31, lr0->32...lr127->159. */ +/* OBSOLETE */ */ +/* OBSOLETE #define SDB_REG_TO_REGNUM(value) (((value)<32) ? ((value)+RETURN_REGNUM) : \ */ +/* OBSOLETE ((value)-32+LR0_REGNUM)) */ +/* OBSOLETE */ +/* OBSOLETE #ifdef KERNEL_DEBUGGING */ +/* OBSOLETE /* ublock virtual address as defined in our sys/param.h */ */ +/* OBSOLETE /* FIXME: Should get this from sys/param.h */ */ +/* OBSOLETE #define UVADDR ((32*0x100000)-8192) */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE /* */ +/* OBSOLETE * Are we in sigtramp(), needed in infrun.c. Specific to ultra3, because */ +/* OBSOLETE * we take off the leading '_'. */ +/* OBSOLETE */ */ +/* OBSOLETE #if !defined(KERNEL_DEBUGGING) */ +/* OBSOLETE #ifdef SYM1 */ +/* OBSOLETE #define IN_SIGTRAMP(pc, name) (name && STREQ ("sigtramp", name)) */ +/* OBSOLETE #else */ +/* OBSOLETE Need to define */ +/* OBSOLETE IN_SIGTRAMP () for sym2. */ +/* OBSOLETE #endif */ +/* OBSOLETE #endif /* !KERNEL_DEBUGGING */ */ +/* OBSOLETE */ +/* OBSOLETE #include "a29k/tm-a29k.h" */ +/* OBSOLETE */ +/* OBSOLETE /**** The following are definitions that override those in tm-a29k.h ****/ */ +/* OBSOLETE */ +/* OBSOLETE /* This sequence of words is the instructions */ +/* OBSOLETE mtsrim cr, 15 */ +/* OBSOLETE loadm 0, 0, lr2, msp ; load first 16 words of arguments into registers */ +/* OBSOLETE add msp, msp, 16 * 4 ; point to the remaining arguments */ +/* OBSOLETE CONST_INSN: */ +/* OBSOLETE const gr96,inf */ +/* OBSOLETE consth gr96,inf */ +/* OBSOLETE calli lr0, gr96 */ +/* OBSOLETE aseq 0x40,gr1,gr1 ; nop */ +/* OBSOLETE asneq 0x50,gr1,gr1 ; breakpoint */ +/* OBSOLETE When KERNEL_DEBUGGIN is defined, msp -> gr93, gr96 -> gr64, */ +/* OBSOLETE 7d -> 5d, 60 -> 40 */ +/* OBSOLETE */ */ +/* OBSOLETE */ +/* OBSOLETE /* Position of the "const" instruction within CALL_DUMMY in bytes. */ */ +/* OBSOLETE #undef CALL_DUMMY */ +/* OBSOLETE #if TARGET_BYTE_ORDER == HOST_BYTE_ORDER */ +/* OBSOLETE #ifdef KERNEL_DEBUGGING /* gr96 -> gr64 */ */ +/* OBSOLETE #define CALL_DUMMY {0x0400870f, 0x3600825d, 0x155d5d40, 0x03ff40ff, \ */ +/* OBSOLETE 0x02ff40ff, 0xc8008040, 0x70400101, 0x72500101} */ +/* OBSOLETE #else */ +/* OBSOLETE #define CALL_DUMMY {0x0400870f, 0x3600827d, 0x157d7d40, 0x03ff60ff, \ */ +/* OBSOLETE 0x02ff60ff, 0xc8008060, 0x70400101, 0x72500101} */ +/* OBSOLETE #endif /* KERNEL_DEBUGGING */ */ +/* OBSOLETE #else /* Byte order differs. */ */ +/* OBSOLETE you lose */ +/* OBSOLETE #endif /* Byte order differs. */ */ +/* OBSOLETE */ +/* OBSOLETE #if !defined(KERNEL_DEBUGGING) */ +/* OBSOLETE #ifdef SYM1 */ +/* OBSOLETE #undef DECR_PC_AFTER_BREAK */ +/* OBSOLETE #define DECR_PC_AFTER_BREAK 0 /* Sym1 kernel does the decrement */ */ +/* OBSOLETE #else */ +/* OBSOLETE ->"ULTRA3 running other than sym1 OS" !; */ +/* OBSOLETE #endif */ +/* OBSOLETE #endif /* !KERNEL_DEBUGGING */ */ diff --git a/gdb/config/a29k/ultra3.mh b/gdb/config/a29k/ultra3.mh index 2f211c5..36e3711 100644 --- a/gdb/config/a29k/ultra3.mh +++ b/gdb/config/a29k/ultra3.mh @@ -1,13 +1,12 @@ -# Host: NYU Ultracomputer (AMD 29000 running Unix) - -CC=u3cc - -XM_FILE= xm-ultra3.h -XDEPFILES= ultra3-xdep.o - -MH_CFLAGS = -DSYM1 -XM_CLIBS = -lsysv -ljobs -ltermlib - -NAT_FILE= nm-ultra3.h -NATDEPFILES= infptrace.o inftarg.o fork-child.o ultra3-nat.o - +# OBSOLETE # Host: NYU Ultracomputer (AMD 29000 running Unix) +# OBSOLETE +# OBSOLETE CC=u3cc +# OBSOLETE +# OBSOLETE XM_FILE= xm-ultra3.h +# OBSOLETE XDEPFILES= ultra3-xdep.o +# OBSOLETE +# OBSOLETE MH_CFLAGS = -DSYM1 +# OBSOLETE XM_CLIBS = -lsysv -ljobs -ltermlib +# OBSOLETE +# OBSOLETE NAT_FILE= nm-ultra3.h +# OBSOLETE NATDEPFILES= infptrace.o inftarg.o fork-child.o ultra3-nat.o diff --git a/gdb/config/a29k/ultra3.mt b/gdb/config/a29k/ultra3.mt index 1f5fd2f..a95d3d1 100644 --- a/gdb/config/a29k/ultra3.mt +++ b/gdb/config/a29k/ultra3.mt @@ -1,6 +1,6 @@ -# Target: AMD 29000 running Unix on New York University processor board -TDEPFILES= a29k-tdep.o -TM_FILE= tm-ultra3.h - -# SYM1 is some OS they have. -MT_CFLAGS = -DSYM1 +# OBSOLETE # Target: AMD 29000 running Unix on New York University processor board +# OBSOLETE TDEPFILES= a29k-tdep.o +# OBSOLETE TM_FILE= tm-ultra3.h +# OBSOLETE +# OBSOLETE # SYM1 is some OS they have. +# OBSOLETE MT_CFLAGS = -DSYM1 diff --git a/gdb/config/a29k/xm-ultra3.h b/gdb/config/a29k/xm-ultra3.h index c9893f8..621e810 100644 --- a/gdb/config/a29k/xm-ultra3.h +++ b/gdb/config/a29k/xm-ultra3.h @@ -1,53 +1,53 @@ -/* Host definitions for GDB running on an a29k NYU Ultracomputer - Copyright 1986, 1987, 1989, 1991, 1993 Free Software Foundation, Inc. - Contributed by David Wood (wood@lab.ultra.nyu.edu). - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the 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 of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Here at NYU we have what we call an ULTRA3 PE board. So - ifdefs for ULTRA3 are my doing. At this point in time, - I don't know of any other Unixi running on the a29k. */ - -#define HOST_BYTE_ORDER BIG_ENDIAN - -#define HAVE_WAIT_STRUCT - -#ifndef L_SET -#define L_SET 0 /* set the seek pointer */ -#define L_INCR 1 /* increment the seek pointer */ -#define L_XTND 2 /* extend the file size */ -#endif - -#ifndef O_RDONLY -#define O_RDONLY 0 -#define O_WRONLY 1 -#define O_RDWR 2 -#endif - -#ifndef F_OK -#define R_OK 4 -#define W_OK 2 -#define X_OK 1 -#define F_OK 0 -#endif - -/* System doesn't provide siginterrupt(). */ -#define NO_SIGINTERRUPT - -/* System uses a `short' to hold a process group ID. */ -#define SHORT_PGRP +/* OBSOLETE /* Host definitions for GDB running on an a29k NYU Ultracomputer */ +/* OBSOLETE Copyright 1986, 1987, 1989, 1991, 1993 Free Software Foundation, Inc. */ +/* OBSOLETE Contributed by David Wood (wood@lab.ultra.nyu.edu). */ +/* 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, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE /* Here at NYU we have what we call an ULTRA3 PE board. So */ +/* OBSOLETE ifdefs for ULTRA3 are my doing. At this point in time, */ +/* OBSOLETE I don't know of any other Unixi running on the a29k. */ */ +/* OBSOLETE */ +/* OBSOLETE #define HOST_BYTE_ORDER BIG_ENDIAN */ +/* OBSOLETE */ +/* OBSOLETE #define HAVE_WAIT_STRUCT */ +/* OBSOLETE */ +/* OBSOLETE #ifndef L_SET */ +/* OBSOLETE #define L_SET 0 /* set the seek pointer */ */ +/* OBSOLETE #define L_INCR 1 /* increment the seek pointer */ */ +/* OBSOLETE #define L_XTND 2 /* extend the file size */ */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE #ifndef O_RDONLY */ +/* OBSOLETE #define O_RDONLY 0 */ +/* OBSOLETE #define O_WRONLY 1 */ +/* OBSOLETE #define O_RDWR 2 */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE #ifndef F_OK */ +/* OBSOLETE #define R_OK 4 */ +/* OBSOLETE #define W_OK 2 */ +/* OBSOLETE #define X_OK 1 */ +/* OBSOLETE #define F_OK 0 */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE /* System doesn't provide siginterrupt(). */ */ +/* OBSOLETE #define NO_SIGINTERRUPT */ +/* OBSOLETE */ +/* OBSOLETE /* System uses a `short' to hold a process group ID. */ */ +/* OBSOLETE #define SHORT_PGRP */ diff --git a/gdb/configure.host b/gdb/configure.host index 620ea85..8e71ff4 100644 --- a/gdb/configure.host +++ b/gdb/configure.host @@ -26,7 +26,7 @@ esac case "${host}" in -a29k-*-*) gdb_host=ultra3 ;; +# OBSOLETE a29k-*-*) gdb_host=ultra3 ;; alpha*-*-osf1*) gdb_host=alpha-osf1 ;; alpha*-*-osf2*) gdb_host=alpha-osf2 ;; diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 00add67..5ec99c0 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -38,9 +38,9 @@ a29k-*-aout*) gdb_target=a29k ;; a29k-*-coff*) gdb_target=a29k ;; a29k-*-elf*) gdb_target=a29k ;; a29k-*-ebmon*) gdb_target=a29k ;; -a29k-*-kern*) gdb_target=a29k-kern ;; +# OBSOLETE a29k-*-kern*) gdb_target=a29k-kern ;; a29k-*-none*) gdb_target=a29k ;; -a29k-*-sym1*) gdb_target=ultra3 ;; +# OBSOLETE a29k-*-sym1*) gdb_target=ultra3 ;; a29k-*-udi*) gdb_target=a29k-udi ;; a29k-*-vxworks*) gdb_target=vx29k ;; diff --git a/gdb/ultra3-nat.c b/gdb/ultra3-nat.c index e1c318b..7c6c133 100644 --- a/gdb/ultra3-nat.c +++ b/gdb/ultra3-nat.c @@ -1,363 +1,363 @@ -/* Native-dependent code for GDB, for NYU Ultra3 running Sym1 OS. - Copyright 1988, 1989, 1991, 1992, 1995, 1996, 1999, 2000, 2001 - Free Software Foundation, Inc. - Contributed by David Wood (wood@nyu.edu) at New York University. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the 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 of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define DEBUG -#include "defs.h" -#include "frame.h" -#include "inferior.h" -#include "symtab.h" -#include "value.h" -#include "regcache.h" - -#include <sys/types.h> -#include <sys/param.h> -#include <signal.h> -#include <sys/ioctl.h> -#include <fcntl.h> - -#include "gdbcore.h" - -#include <sys/file.h> -#include "gdb_stat.h" - -static void fetch_core_registers (char *, unsigned, int, CORE_ADDR); - -/* Assumes support for AMD's Binary Compatibility Standard - for ptrace(). If you define ULTRA3, the ultra3 extensions to - ptrace() are used allowing the reading of more than one register - at a time. - - This file assumes KERNEL_DEBUGGING is turned off. This means - that if the user/gdb tries to read gr64-gr95 or any of the - protected special registers we silently return -1 (see the - CANNOT_STORE/FETCH_REGISTER macros). */ -#define ULTRA3 - -#if !defined (offsetof) -#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER) -#endif - -extern int errno; -struct ptrace_user pt_struct; - -/* Get all available registers from the inferior. Registers that are - * defined in REGISTER_NAMES, but not available to the user/gdb are - * supplied as -1. This may include gr64-gr95 and the protected special - * purpose registers. - */ - -void -fetch_inferior_registers (int regno) -{ - register int i, j, ret_val = 0; - char buf[128]; - - if (regno != -1) - { - fetch_register (regno); - return; - } - -/* Global Registers */ -#ifdef ULTRA3 - errno = 0; - ptrace (PT_READ_STRUCT, inferior_pid, - (PTRACE_ARG3_TYPE) register_addr (GR96_REGNUM, 0), - (int) &pt_struct.pt_gr[0], 32 * 4); - if (errno != 0) - { - perror_with_name ("reading global registers"); - ret_val = -1; - } - else - for (regno = GR96_REGNUM, j = 0; j < 32; regno++, j++) - { - supply_register (regno, &pt_struct.pt_gr[j]); - } -#else - for (regno = GR96_REGNUM; !ret_val && regno < GR96_REGNUM + 32; regno++) - fetch_register (regno); -#endif - -/* Local Registers */ -#ifdef ULTRA3 - errno = 0; - ptrace (PT_READ_STRUCT, inferior_pid, - (PTRACE_ARG3_TYPE) register_addr (LR0_REGNUM, 0), - (int) &pt_struct.pt_lr[0], 128 * 4); - if (errno != 0) - { - perror_with_name ("reading local registers"); - ret_val = -1; - } - else - for (regno = LR0_REGNUM, j = 0; j < 128; regno++, j++) - { - supply_register (regno, &pt_struct.pt_lr[j]); - } -#else - for (regno = LR0_REGNUM; !ret_val && regno < LR0_REGNUM + 128; regno++) - fetch_register (regno); -#endif - -/* Special Registers */ - fetch_register (GR1_REGNUM); - fetch_register (CPS_REGNUM); - fetch_register (PC_REGNUM); - fetch_register (NPC_REGNUM); - fetch_register (PC2_REGNUM); - fetch_register (IPC_REGNUM); - fetch_register (IPA_REGNUM); - fetch_register (IPB_REGNUM); - fetch_register (Q_REGNUM); - fetch_register (BP_REGNUM); - fetch_register (FC_REGNUM); - -/* Fake any registers that are in REGISTER_NAMES, but not available to gdb */ - registers_fetched (); -} - -/* Store our register values back into the inferior. - * If REGNO is -1, do this for all registers. - * Otherwise, REGNO specifies which register (so we can save time). - * NOTE: Assumes AMD's binary compatibility standard. - */ - -void -store_inferior_registers (int regno) -{ - register unsigned int regaddr; - char buf[80]; - - if (regno >= 0) - { - if (CANNOT_STORE_REGISTER (regno)) - return; - regaddr = register_addr (regno, 0); - errno = 0; - ptrace (PT_WRITE_U, inferior_pid, - (PTRACE_ARG3_TYPE) regaddr, read_register (regno)); - if (errno != 0) - { - sprintf (buf, "writing register %s (#%d)", REGISTER_NAME (regno), regno); - perror_with_name (buf); - } - } - else - { -#ifdef ULTRA3 - pt_struct.pt_gr1 = read_register (GR1_REGNUM); - for (regno = GR96_REGNUM; regno < GR96_REGNUM + 32; regno++) - pt_struct.pt_gr[regno] = read_register (regno); - for (regno = LR0_REGNUM; regno < LR0_REGNUM + 128; regno++) - pt_struct.pt_gr[regno] = read_register (regno); - errno = 0; - ptrace (PT_WRITE_STRUCT, inferior_pid, - (PTRACE_ARG3_TYPE) register_addr (GR1_REGNUM, 0), - (int) &pt_struct.pt_gr1, (1 * 32 * 128) * 4); - if (errno != 0) - { - sprintf (buf, "writing all local/global registers"); - perror_with_name (buf); - } - pt_struct.pt_psr = read_register (CPS_REGNUM); - pt_struct.pt_pc0 = read_register (NPC_REGNUM); - pt_struct.pt_pc1 = read_register (PC_REGNUM); - pt_struct.pt_pc2 = read_register (PC2_REGNUM); - pt_struct.pt_ipc = read_register (IPC_REGNUM); - pt_struct.pt_ipa = read_register (IPA_REGNUM); - pt_struct.pt_ipb = read_register (IPB_REGNUM); - pt_struct.pt_q = read_register (Q_REGNUM); - pt_struct.pt_bp = read_register (BP_REGNUM); - pt_struct.pt_fc = read_register (FC_REGNUM); - errno = 0; - ptrace (PT_WRITE_STRUCT, inferior_pid, - (PTRACE_ARG3_TYPE) register_addr (CPS_REGNUM, 0), - (int) &pt_struct.pt_psr, (10) * 4); - if (errno != 0) - { - sprintf (buf, "writing all special registers"); - perror_with_name (buf); - return; - } -#else - store_inferior_registers (GR1_REGNUM); - for (regno = GR96_REGNUM; regno < GR96_REGNUM + 32; regno++) - store_inferior_registers (regno); - for (regno = LR0_REGNUM; regno < LR0_REGNUM + 128; regno++) - store_inferior_registers (regno); - store_inferior_registers (CPS_REGNUM); - store_inferior_registers (PC_REGNUM); - store_inferior_registers (NPC_REGNUM); - store_inferior_registers (PC2_REGNUM); - store_inferior_registers (IPC_REGNUM); - store_inferior_registers (IPA_REGNUM); - store_inferior_registers (IPB_REGNUM); - store_inferior_registers (Q_REGNUM); - store_inferior_registers (BP_REGNUM); - store_inferior_registers (FC_REGNUM); -#endif /* ULTRA3 */ - } -} - -/* - * Fetch an individual register (and supply it). - * return 0 on success, -1 on failure. - * NOTE: Assumes AMD's Binary Compatibility Standard for ptrace(). - */ -static void -fetch_register (int regno) -{ - char buf[128]; - int val; - - if (CANNOT_FETCH_REGISTER (regno)) - { - val = -1; - supply_register (regno, &val); - } - else - { - errno = 0; - val = ptrace (PT_READ_U, inferior_pid, - (PTRACE_ARG3_TYPE) register_addr (regno, 0), 0); - if (errno != 0) - { - sprintf (buf, "reading register %s (#%d)", REGISTER_NAME (regno), regno); - perror_with_name (buf); - } - else - { - supply_register (regno, &val); - } - } -} - - -/* - * Read AMD's Binary Compatibilty Standard conforming core file. - * struct ptrace_user is the first thing in the core file - * - * CORE_REG_SECT, CORE_REG_SIZE, WHICH, and REG_ADDR are all ignored. - */ - -static void -fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, - int which, CORE_ADDR reg_addr) -{ - register int regno; - int val; - char buf[4]; - - for (regno = 0; regno < NUM_REGS; regno++) - { - if (!CANNOT_FETCH_REGISTER (regno)) - { - val = bfd_seek (core_bfd, (file_ptr) register_addr (regno, 0), SEEK_SET); - if (val < 0 || (val = bfd_read (buf, sizeof buf, 1, core_bfd)) < 0) - { - char *buffer = (char *) alloca (strlen (REGISTER_NAME (regno)) + 35); - strcpy (buffer, "Reading core register "); - strcat (buffer, REGISTER_NAME (regno)); - perror_with_name (buffer); - } - supply_register (regno, buf); - } - } - - /* Fake any registers that are in REGISTER_NAMES, but not available to gdb */ - registers_fetched (); -} - - -/* - * Takes a register number as defined in tm.h via REGISTER_NAMES, and maps - * it to an offset in a struct ptrace_user defined by AMD's BCS. - * That is, it defines the mapping between gdb register numbers and items in - * a struct ptrace_user. - * A register protection scheme is set up here. If a register not - * available to the user is specified in 'regno', then an address that - * will cause ptrace() to fail is returned. - */ -CORE_ADDR -register_addr (int regno, CORE_ADDR blockend) -{ - if ((regno >= LR0_REGNUM) && (regno < LR0_REGNUM + 128)) - { - return (offsetof (struct ptrace_user, pt_lr[regno - LR0_REGNUM])); - } - else if ((regno >= GR96_REGNUM) && (regno < GR96_REGNUM + 32)) - { - return (offsetof (struct ptrace_user, pt_gr[regno - GR96_REGNUM])); - } - else - { - switch (regno) - { - case GR1_REGNUM: - return (offsetof (struct ptrace_user, pt_gr1)); - case CPS_REGNUM: - return (offsetof (struct ptrace_user, pt_psr)); - case NPC_REGNUM: - return (offsetof (struct ptrace_user, pt_pc0)); - case PC_REGNUM: - return (offsetof (struct ptrace_user, pt_pc1)); - case PC2_REGNUM: - return (offsetof (struct ptrace_user, pt_pc2)); - case IPC_REGNUM: - return (offsetof (struct ptrace_user, pt_ipc)); - case IPA_REGNUM: - return (offsetof (struct ptrace_user, pt_ipa)); - case IPB_REGNUM: - return (offsetof (struct ptrace_user, pt_ipb)); - case Q_REGNUM: - return (offsetof (struct ptrace_user, pt_q)); - case BP_REGNUM: - return (offsetof (struct ptrace_user, pt_bp)); - case FC_REGNUM: - return (offsetof (struct ptrace_user, pt_fc)); - default: - fprintf_filtered (gdb_stderr, "register_addr():Bad register %s (%d)\n", - REGISTER_NAME (regno), regno); - return (0xffffffff); /* Should make ptrace() fail */ - } - } -} - - -/* Register that we are able to handle ultra3 core file formats. - FIXME: is this really bfd_target_unknown_flavour? */ - -static struct core_fns ultra3_core_fns = -{ - bfd_target_unknown_flavour, /* core_flavour */ - default_check_format, /* check_format */ - default_core_sniffer, /* core_sniffer */ - fetch_core_registers, /* core_read_registers */ - NULL /* next */ -}; - -void -_initialize_core_ultra3 (void) -{ - add_core_fns (&ultra3_core_fns); -} +/* OBSOLETE /* Native-dependent code for GDB, for NYU Ultra3 running Sym1 OS. */ +/* OBSOLETE Copyright 1988, 1989, 1991, 1992, 1995, 1996, 1999, 2000, 2001 */ +/* OBSOLETE Free Software Foundation, Inc. */ +/* OBSOLETE Contributed by David Wood (wood@nyu.edu) at New York University. */ +/* 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, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE #define DEBUG */ +/* OBSOLETE #include "defs.h" */ +/* OBSOLETE #include "frame.h" */ +/* OBSOLETE #include "inferior.h" */ +/* OBSOLETE #include "symtab.h" */ +/* OBSOLETE #include "value.h" */ +/* OBSOLETE #include "regcache.h" */ +/* OBSOLETE */ +/* OBSOLETE #include <sys/types.h> */ +/* OBSOLETE #include <sys/param.h> */ +/* OBSOLETE #include <signal.h> */ +/* OBSOLETE #include <sys/ioctl.h> */ +/* OBSOLETE #include <fcntl.h> */ +/* OBSOLETE */ +/* OBSOLETE #include "gdbcore.h" */ +/* OBSOLETE */ +/* OBSOLETE #include <sys/file.h> */ +/* OBSOLETE #include "gdb_stat.h" */ +/* OBSOLETE */ +/* OBSOLETE static void fetch_core_registers (char *, unsigned, int, CORE_ADDR); */ +/* OBSOLETE */ +/* OBSOLETE /* Assumes support for AMD's Binary Compatibility Standard */ +/* OBSOLETE for ptrace(). If you define ULTRA3, the ultra3 extensions to */ +/* OBSOLETE ptrace() are used allowing the reading of more than one register */ +/* OBSOLETE at a time. */ +/* OBSOLETE */ +/* OBSOLETE This file assumes KERNEL_DEBUGGING is turned off. This means */ +/* OBSOLETE that if the user/gdb tries to read gr64-gr95 or any of the */ +/* OBSOLETE protected special registers we silently return -1 (see the */ +/* OBSOLETE CANNOT_STORE/FETCH_REGISTER macros). */ */ +/* OBSOLETE #define ULTRA3 */ +/* OBSOLETE */ +/* OBSOLETE #if !defined (offsetof) */ +/* OBSOLETE #define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER) */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE extern int errno; */ +/* OBSOLETE struct ptrace_user pt_struct; */ +/* OBSOLETE */ +/* OBSOLETE /* Get all available registers from the inferior. Registers that are */ +/* OBSOLETE * defined in REGISTER_NAMES, but not available to the user/gdb are */ +/* OBSOLETE * supplied as -1. This may include gr64-gr95 and the protected special */ +/* OBSOLETE * purpose registers. */ +/* OBSOLETE */ */ +/* OBSOLETE */ +/* OBSOLETE void */ +/* OBSOLETE fetch_inferior_registers (int regno) */ +/* OBSOLETE { */ +/* OBSOLETE register int i, j, ret_val = 0; */ +/* OBSOLETE char buf[128]; */ +/* OBSOLETE */ +/* OBSOLETE if (regno != -1) */ +/* OBSOLETE { */ +/* OBSOLETE fetch_register (regno); */ +/* OBSOLETE return; */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE /* Global Registers */ */ +/* OBSOLETE #ifdef ULTRA3 */ +/* OBSOLETE errno = 0; */ +/* OBSOLETE ptrace (PT_READ_STRUCT, inferior_pid, */ +/* OBSOLETE (PTRACE_ARG3_TYPE) register_addr (GR96_REGNUM, 0), */ +/* OBSOLETE (int) &pt_struct.pt_gr[0], 32 * 4); */ +/* OBSOLETE if (errno != 0) */ +/* OBSOLETE { */ +/* OBSOLETE perror_with_name ("reading global registers"); */ +/* OBSOLETE ret_val = -1; */ +/* OBSOLETE } */ +/* OBSOLETE else */ +/* OBSOLETE for (regno = GR96_REGNUM, j = 0; j < 32; regno++, j++) */ +/* OBSOLETE { */ +/* OBSOLETE supply_register (regno, &pt_struct.pt_gr[j]); */ +/* OBSOLETE } */ +/* OBSOLETE #else */ +/* OBSOLETE for (regno = GR96_REGNUM; !ret_val && regno < GR96_REGNUM + 32; regno++) */ +/* OBSOLETE fetch_register (regno); */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE /* Local Registers */ */ +/* OBSOLETE #ifdef ULTRA3 */ +/* OBSOLETE errno = 0; */ +/* OBSOLETE ptrace (PT_READ_STRUCT, inferior_pid, */ +/* OBSOLETE (PTRACE_ARG3_TYPE) register_addr (LR0_REGNUM, 0), */ +/* OBSOLETE (int) &pt_struct.pt_lr[0], 128 * 4); */ +/* OBSOLETE if (errno != 0) */ +/* OBSOLETE { */ +/* OBSOLETE perror_with_name ("reading local registers"); */ +/* OBSOLETE ret_val = -1; */ +/* OBSOLETE } */ +/* OBSOLETE else */ +/* OBSOLETE for (regno = LR0_REGNUM, j = 0; j < 128; regno++, j++) */ +/* OBSOLETE { */ +/* OBSOLETE supply_register (regno, &pt_struct.pt_lr[j]); */ +/* OBSOLETE } */ +/* OBSOLETE #else */ +/* OBSOLETE for (regno = LR0_REGNUM; !ret_val && regno < LR0_REGNUM + 128; regno++) */ +/* OBSOLETE fetch_register (regno); */ +/* OBSOLETE #endif */ +/* OBSOLETE */ +/* OBSOLETE /* Special Registers */ */ +/* OBSOLETE fetch_register (GR1_REGNUM); */ +/* OBSOLETE fetch_register (CPS_REGNUM); */ +/* OBSOLETE fetch_register (PC_REGNUM); */ +/* OBSOLETE fetch_register (NPC_REGNUM); */ +/* OBSOLETE fetch_register (PC2_REGNUM); */ +/* OBSOLETE fetch_register (IPC_REGNUM); */ +/* OBSOLETE fetch_register (IPA_REGNUM); */ +/* OBSOLETE fetch_register (IPB_REGNUM); */ +/* OBSOLETE fetch_register (Q_REGNUM); */ +/* OBSOLETE fetch_register (BP_REGNUM); */ +/* OBSOLETE fetch_register (FC_REGNUM); */ +/* OBSOLETE */ +/* OBSOLETE /* Fake any registers that are in REGISTER_NAMES, but not available to gdb */ */ +/* OBSOLETE registers_fetched (); */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE /* Store our register values back into the inferior. */ +/* OBSOLETE * If REGNO is -1, do this for all registers. */ +/* OBSOLETE * Otherwise, REGNO specifies which register (so we can save time). */ +/* OBSOLETE * NOTE: Assumes AMD's binary compatibility standard. */ +/* OBSOLETE */ */ +/* OBSOLETE */ +/* OBSOLETE void */ +/* OBSOLETE store_inferior_registers (int regno) */ +/* OBSOLETE { */ +/* OBSOLETE register unsigned int regaddr; */ +/* OBSOLETE char buf[80]; */ +/* OBSOLETE */ +/* OBSOLETE if (regno >= 0) */ +/* OBSOLETE { */ +/* OBSOLETE if (CANNOT_STORE_REGISTER (regno)) */ +/* OBSOLETE return; */ +/* OBSOLETE regaddr = register_addr (regno, 0); */ +/* OBSOLETE errno = 0; */ +/* OBSOLETE ptrace (PT_WRITE_U, inferior_pid, */ +/* OBSOLETE (PTRACE_ARG3_TYPE) regaddr, read_register (regno)); */ +/* OBSOLETE if (errno != 0) */ +/* OBSOLETE { */ +/* OBSOLETE sprintf (buf, "writing register %s (#%d)", REGISTER_NAME (regno), regno); */ +/* OBSOLETE perror_with_name (buf); */ +/* OBSOLETE } */ +/* OBSOLETE } */ +/* OBSOLETE else */ +/* OBSOLETE { */ +/* OBSOLETE #ifdef ULTRA3 */ +/* OBSOLETE pt_struct.pt_gr1 = read_register (GR1_REGNUM); */ +/* OBSOLETE for (regno = GR96_REGNUM; regno < GR96_REGNUM + 32; regno++) */ +/* OBSOLETE pt_struct.pt_gr[regno] = read_register (regno); */ +/* OBSOLETE for (regno = LR0_REGNUM; regno < LR0_REGNUM + 128; regno++) */ +/* OBSOLETE pt_struct.pt_gr[regno] = read_register (regno); */ +/* OBSOLETE errno = 0; */ +/* OBSOLETE ptrace (PT_WRITE_STRUCT, inferior_pid, */ +/* OBSOLETE (PTRACE_ARG3_TYPE) register_addr (GR1_REGNUM, 0), */ +/* OBSOLETE (int) &pt_struct.pt_gr1, (1 * 32 * 128) * 4); */ +/* OBSOLETE if (errno != 0) */ +/* OBSOLETE { */ +/* OBSOLETE sprintf (buf, "writing all local/global registers"); */ +/* OBSOLETE perror_with_name (buf); */ +/* OBSOLETE } */ +/* OBSOLETE pt_struct.pt_psr = read_register (CPS_REGNUM); */ +/* OBSOLETE pt_struct.pt_pc0 = read_register (NPC_REGNUM); */ +/* OBSOLETE pt_struct.pt_pc1 = read_register (PC_REGNUM); */ +/* OBSOLETE pt_struct.pt_pc2 = read_register (PC2_REGNUM); */ +/* OBSOLETE pt_struct.pt_ipc = read_register (IPC_REGNUM); */ +/* OBSOLETE pt_struct.pt_ipa = read_register (IPA_REGNUM); */ +/* OBSOLETE pt_struct.pt_ipb = read_register (IPB_REGNUM); */ +/* OBSOLETE pt_struct.pt_q = read_register (Q_REGNUM); */ +/* OBSOLETE pt_struct.pt_bp = read_register (BP_REGNUM); */ +/* OBSOLETE pt_struct.pt_fc = read_register (FC_REGNUM); */ +/* OBSOLETE errno = 0; */ +/* OBSOLETE ptrace (PT_WRITE_STRUCT, inferior_pid, */ +/* OBSOLETE (PTRACE_ARG3_TYPE) register_addr (CPS_REGNUM, 0), */ +/* OBSOLETE (int) &pt_struct.pt_psr, (10) * 4); */ +/* OBSOLETE if (errno != 0) */ +/* OBSOLETE { */ +/* OBSOLETE sprintf (buf, "writing all special registers"); */ +/* OBSOLETE perror_with_name (buf); */ +/* OBSOLETE return; */ +/* OBSOLETE } */ +/* OBSOLETE #else */ +/* OBSOLETE store_inferior_registers (GR1_REGNUM); */ +/* OBSOLETE for (regno = GR96_REGNUM; regno < GR96_REGNUM + 32; regno++) */ +/* OBSOLETE store_inferior_registers (regno); */ +/* OBSOLETE for (regno = LR0_REGNUM; regno < LR0_REGNUM + 128; regno++) */ +/* OBSOLETE store_inferior_registers (regno); */ +/* OBSOLETE store_inferior_registers (CPS_REGNUM); */ +/* OBSOLETE store_inferior_registers (PC_REGNUM); */ +/* OBSOLETE store_inferior_registers (NPC_REGNUM); */ +/* OBSOLETE store_inferior_registers (PC2_REGNUM); */ +/* OBSOLETE store_inferior_registers (IPC_REGNUM); */ +/* OBSOLETE store_inferior_registers (IPA_REGNUM); */ +/* OBSOLETE store_inferior_registers (IPB_REGNUM); */ +/* OBSOLETE store_inferior_registers (Q_REGNUM); */ +/* OBSOLETE store_inferior_registers (BP_REGNUM); */ +/* OBSOLETE store_inferior_registers (FC_REGNUM); */ +/* OBSOLETE #endif /* ULTRA3 */ */ +/* OBSOLETE } */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE /* */ +/* OBSOLETE * Fetch an individual register (and supply it). */ +/* OBSOLETE * return 0 on success, -1 on failure. */ +/* OBSOLETE * NOTE: Assumes AMD's Binary Compatibility Standard for ptrace(). */ +/* OBSOLETE */ */ +/* OBSOLETE static void */ +/* OBSOLETE fetch_register (int regno) */ +/* OBSOLETE { */ +/* OBSOLETE char buf[128]; */ +/* OBSOLETE int val; */ +/* OBSOLETE */ +/* OBSOLETE if (CANNOT_FETCH_REGISTER (regno)) */ +/* OBSOLETE { */ +/* OBSOLETE val = -1; */ +/* OBSOLETE supply_register (regno, &val); */ +/* OBSOLETE } */ +/* OBSOLETE else */ +/* OBSOLETE { */ +/* OBSOLETE errno = 0; */ +/* OBSOLETE val = ptrace (PT_READ_U, inferior_pid, */ +/* OBSOLETE (PTRACE_ARG3_TYPE) register_addr (regno, 0), 0); */ +/* OBSOLETE if (errno != 0) */ +/* OBSOLETE { */ +/* OBSOLETE sprintf (buf, "reading register %s (#%d)", REGISTER_NAME (regno), regno); */ +/* OBSOLETE perror_with_name (buf); */ +/* OBSOLETE } */ +/* OBSOLETE else */ +/* OBSOLETE { */ +/* OBSOLETE supply_register (regno, &val); */ +/* OBSOLETE } */ +/* OBSOLETE } */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE */ +/* OBSOLETE /* */ +/* OBSOLETE * Read AMD's Binary Compatibilty Standard conforming core file. */ +/* OBSOLETE * struct ptrace_user is the first thing in the core file */ +/* OBSOLETE * */ +/* OBSOLETE * CORE_REG_SECT, CORE_REG_SIZE, WHICH, and REG_ADDR are all ignored. */ +/* OBSOLETE */ */ +/* OBSOLETE */ +/* OBSOLETE static void */ +/* OBSOLETE fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, */ +/* OBSOLETE int which, CORE_ADDR reg_addr) */ +/* OBSOLETE { */ +/* OBSOLETE register int regno; */ +/* OBSOLETE int val; */ +/* OBSOLETE char buf[4]; */ +/* OBSOLETE */ +/* OBSOLETE for (regno = 0; regno < NUM_REGS; regno++) */ +/* OBSOLETE { */ +/* OBSOLETE if (!CANNOT_FETCH_REGISTER (regno)) */ +/* OBSOLETE { */ +/* OBSOLETE val = bfd_seek (core_bfd, (file_ptr) register_addr (regno, 0), SEEK_SET); */ +/* OBSOLETE if (val < 0 || (val = bfd_read (buf, sizeof buf, 1, core_bfd)) < 0) */ +/* OBSOLETE { */ +/* OBSOLETE char *buffer = (char *) alloca (strlen (REGISTER_NAME (regno)) + 35); */ +/* OBSOLETE strcpy (buffer, "Reading core register "); */ +/* OBSOLETE strcat (buffer, REGISTER_NAME (regno)); */ +/* OBSOLETE perror_with_name (buffer); */ +/* OBSOLETE } */ +/* OBSOLETE supply_register (regno, buf); */ +/* OBSOLETE } */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE /* Fake any registers that are in REGISTER_NAMES, but not available to gdb */ */ +/* OBSOLETE registers_fetched (); */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE */ +/* OBSOLETE /* */ +/* OBSOLETE * Takes a register number as defined in tm.h via REGISTER_NAMES, and maps */ +/* OBSOLETE * it to an offset in a struct ptrace_user defined by AMD's BCS. */ +/* OBSOLETE * That is, it defines the mapping between gdb register numbers and items in */ +/* OBSOLETE * a struct ptrace_user. */ +/* OBSOLETE * A register protection scheme is set up here. If a register not */ +/* OBSOLETE * available to the user is specified in 'regno', then an address that */ +/* OBSOLETE * will cause ptrace() to fail is returned. */ +/* OBSOLETE */ */ +/* OBSOLETE CORE_ADDR */ +/* OBSOLETE register_addr (int regno, CORE_ADDR blockend) */ +/* OBSOLETE { */ +/* OBSOLETE if ((regno >= LR0_REGNUM) && (regno < LR0_REGNUM + 128)) */ +/* OBSOLETE { */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_lr[regno - LR0_REGNUM])); */ +/* OBSOLETE } */ +/* OBSOLETE else if ((regno >= GR96_REGNUM) && (regno < GR96_REGNUM + 32)) */ +/* OBSOLETE { */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_gr[regno - GR96_REGNUM])); */ +/* OBSOLETE } */ +/* OBSOLETE else */ +/* OBSOLETE { */ +/* OBSOLETE switch (regno) */ +/* OBSOLETE { */ +/* OBSOLETE case GR1_REGNUM: */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_gr1)); */ +/* OBSOLETE case CPS_REGNUM: */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_psr)); */ +/* OBSOLETE case NPC_REGNUM: */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_pc0)); */ +/* OBSOLETE case PC_REGNUM: */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_pc1)); */ +/* OBSOLETE case PC2_REGNUM: */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_pc2)); */ +/* OBSOLETE case IPC_REGNUM: */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_ipc)); */ +/* OBSOLETE case IPA_REGNUM: */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_ipa)); */ +/* OBSOLETE case IPB_REGNUM: */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_ipb)); */ +/* OBSOLETE case Q_REGNUM: */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_q)); */ +/* OBSOLETE case BP_REGNUM: */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_bp)); */ +/* OBSOLETE case FC_REGNUM: */ +/* OBSOLETE return (offsetof (struct ptrace_user, pt_fc)); */ +/* OBSOLETE default: */ +/* OBSOLETE fprintf_filtered (gdb_stderr, "register_addr():Bad register %s (%d)\n", */ +/* OBSOLETE REGISTER_NAME (regno), regno); */ +/* OBSOLETE return (0xffffffff); /* Should make ptrace() fail */ */ +/* OBSOLETE } */ +/* OBSOLETE } */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE */ +/* OBSOLETE /* Register that we are able to handle ultra3 core file formats. */ +/* OBSOLETE FIXME: is this really bfd_target_unknown_flavour? */ */ +/* OBSOLETE */ +/* OBSOLETE static struct core_fns ultra3_core_fns = */ +/* OBSOLETE { */ +/* OBSOLETE bfd_target_unknown_flavour, /* core_flavour */ */ +/* OBSOLETE default_check_format, /* check_format */ */ +/* OBSOLETE default_core_sniffer, /* core_sniffer */ */ +/* OBSOLETE fetch_core_registers, /* core_read_registers */ */ +/* OBSOLETE NULL /* next */ */ +/* OBSOLETE }; */ +/* OBSOLETE */ +/* OBSOLETE void */ +/* OBSOLETE _initialize_core_ultra3 (void) */ +/* OBSOLETE { */ +/* OBSOLETE add_core_fns (&ultra3_core_fns); */ +/* OBSOLETE } */ diff --git a/gdb/ultra3-xdep.c b/gdb/ultra3-xdep.c index 937f6a7..ea87fd6 100644 --- a/gdb/ultra3-xdep.c +++ b/gdb/ultra3-xdep.c @@ -1,138 +1,138 @@ -/* Host-dependent code for GDB, for NYU Ultra3 running Sym1 OS. - Copyright 1988, 1989, 1991, 1992, 1993, 1995, 2000 - Free Software Foundation, Inc. - Contributed by David Wood (wood@nyu.edu) at New York University. - - This file is part of GDB. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the 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 of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#define DEBUG -#include "defs.h" -#include "frame.h" -#include "inferior.h" -#include "symtab.h" -#include "value.h" - -#include <sys/types.h> -#include <sys/param.h> -#include <signal.h> -#include <sys/ioctl.h> -#include <fcntl.h> - -#include "gdbcore.h" - -#include <sys/file.h> -#include "gdb_stat.h" - -/* Assorted operating system circumventions */ - -#ifdef SYM1 - -/* FIXME: Kludge this for now. It really should be system call. */ -int -getpagesize (void) -{ - return (8192); -} - -/* FIXME: Fake out the fcntl() call, which we don't have. */ -fcntl (int fd, int cmd, int arg) -{ - - switch (cmd) - { - case F_GETFL: - return (O_RDONLY); - break; - default: - printf_unfiltered ("Ultra3's fcntl() failing, cmd = %d.\n", cmd); - return (-1); - } -} - - -/* - * 4.2 Signal support, requires linking with libjobs. - */ -static int _SigMask; -#define sigbit(s) (1L << ((s)-1)) - -init_SigMask (void) -{ - /* Taken from the sym1 kernel in machdep.c:startup() */ - _SigMask = sigbit (SIGTSTP) | sigbit (SIGTTOU) | sigbit (SIGTTIN) | - sigbit (SIGCHLD) | sigbit (SIGTINT); -} - -sigmask (int signo) -{ - return (1 << (signo - 1)); -} - -sigsetmask (unsigned int sigmask) -{ - int i, mask = 1; - int lastmask = _SigMask; - - for (i = 0; i < NSIG; i++) - { - if (sigmask & mask) - { - if (!(_SigMask & mask)) - { - sighold (i + 1); - _SigMask |= mask; - } - } - else if (_SigMask & mask) - { - sigrelse (i + 1); - _SigMask &= ~mask; - } - mask <<= 1; - } - return (lastmask); -} - -sigblock (unsigned int sigmask) -{ - int i, mask = 1; - int lastmask = _SigMask; - - for (i = 0; i < NSIG; i++) - { - if ((sigmask & mask) && !(_SigMask & mask)) - { - sighold (i + 1); - _SigMask |= mask; - } - mask <<= 1; - } - return (lastmask); -} -#endif /* SYM1 */ - - -/* Initialization code for this module. */ - -void -_initialize_ultra3 (void) -{ -#ifdef SYM1 - init_SigMask (); -#endif -} +/* OBSOLETE /* Host-dependent code for GDB, for NYU Ultra3 running Sym1 OS. */ +/* OBSOLETE Copyright 1988, 1989, 1991, 1992, 1993, 1995, 2000 */ +/* OBSOLETE Free Software Foundation, Inc. */ +/* OBSOLETE Contributed by David Wood (wood@nyu.edu) at New York University. */ +/* 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, */ +/* OBSOLETE Boston, MA 02111-1307, USA. */ */ +/* OBSOLETE */ +/* OBSOLETE #define DEBUG */ +/* OBSOLETE #include "defs.h" */ +/* OBSOLETE #include "frame.h" */ +/* OBSOLETE #include "inferior.h" */ +/* OBSOLETE #include "symtab.h" */ +/* OBSOLETE #include "value.h" */ +/* OBSOLETE */ +/* OBSOLETE #include <sys/types.h> */ +/* OBSOLETE #include <sys/param.h> */ +/* OBSOLETE #include <signal.h> */ +/* OBSOLETE #include <sys/ioctl.h> */ +/* OBSOLETE #include <fcntl.h> */ +/* OBSOLETE */ +/* OBSOLETE #include "gdbcore.h" */ +/* OBSOLETE */ +/* OBSOLETE #include <sys/file.h> */ +/* OBSOLETE #include "gdb_stat.h" */ +/* OBSOLETE */ +/* OBSOLETE /* Assorted operating system circumventions */ */ +/* OBSOLETE */ +/* OBSOLETE #ifdef SYM1 */ +/* OBSOLETE */ +/* OBSOLETE /* FIXME: Kludge this for now. It really should be system call. */ */ +/* OBSOLETE int */ +/* OBSOLETE getpagesize (void) */ +/* OBSOLETE { */ +/* OBSOLETE return (8192); */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE /* FIXME: Fake out the fcntl() call, which we don't have. */ */ +/* OBSOLETE fcntl (int fd, int cmd, int arg) */ +/* OBSOLETE { */ +/* OBSOLETE */ +/* OBSOLETE switch (cmd) */ +/* OBSOLETE { */ +/* OBSOLETE case F_GETFL: */ +/* OBSOLETE return (O_RDONLY); */ +/* OBSOLETE break; */ +/* OBSOLETE default: */ +/* OBSOLETE printf_unfiltered ("Ultra3's fcntl() failing, cmd = %d.\n", cmd); */ +/* OBSOLETE return (-1); */ +/* OBSOLETE } */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE */ +/* OBSOLETE /* */ +/* OBSOLETE * 4.2 Signal support, requires linking with libjobs. */ +/* OBSOLETE */ */ +/* OBSOLETE static int _SigMask; */ +/* OBSOLETE #define sigbit(s) (1L << ((s)-1)) */ +/* OBSOLETE */ +/* OBSOLETE init_SigMask (void) */ +/* OBSOLETE { */ +/* OBSOLETE /* Taken from the sym1 kernel in machdep.c:startup() */ */ +/* OBSOLETE _SigMask = sigbit (SIGTSTP) | sigbit (SIGTTOU) | sigbit (SIGTTIN) | */ +/* OBSOLETE sigbit (SIGCHLD) | sigbit (SIGTINT); */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE sigmask (int signo) */ +/* OBSOLETE { */ +/* OBSOLETE return (1 << (signo - 1)); */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE sigsetmask (unsigned int sigmask) */ +/* OBSOLETE { */ +/* OBSOLETE int i, mask = 1; */ +/* OBSOLETE int lastmask = _SigMask; */ +/* OBSOLETE */ +/* OBSOLETE for (i = 0; i < NSIG; i++) */ +/* OBSOLETE { */ +/* OBSOLETE if (sigmask & mask) */ +/* OBSOLETE { */ +/* OBSOLETE if (!(_SigMask & mask)) */ +/* OBSOLETE { */ +/* OBSOLETE sighold (i + 1); */ +/* OBSOLETE _SigMask |= mask; */ +/* OBSOLETE } */ +/* OBSOLETE } */ +/* OBSOLETE else if (_SigMask & mask) */ +/* OBSOLETE { */ +/* OBSOLETE sigrelse (i + 1); */ +/* OBSOLETE _SigMask &= ~mask; */ +/* OBSOLETE } */ +/* OBSOLETE mask <<= 1; */ +/* OBSOLETE } */ +/* OBSOLETE return (lastmask); */ +/* OBSOLETE } */ +/* OBSOLETE */ +/* OBSOLETE sigblock (unsigned int sigmask) */ +/* OBSOLETE { */ +/* OBSOLETE int i, mask = 1; */ +/* OBSOLETE int lastmask = _SigMask; */ +/* OBSOLETE */ +/* OBSOLETE for (i = 0; i < NSIG; i++) */ +/* OBSOLETE { */ +/* OBSOLETE if ((sigmask & mask) && !(_SigMask & mask)) */ +/* OBSOLETE { */ +/* OBSOLETE sighold (i + 1); */ +/* OBSOLETE _SigMask |= mask; */ +/* OBSOLETE } */ +/* OBSOLETE mask <<= 1; */ +/* OBSOLETE } */ +/* OBSOLETE return (lastmask); */ +/* OBSOLETE } */ +/* OBSOLETE #endif /* SYM1 */ */ +/* OBSOLETE */ +/* OBSOLETE */ +/* OBSOLETE /* Initialization code for this module. */ */ +/* OBSOLETE */ +/* OBSOLETE void */ +/* OBSOLETE _initialize_ultra3 (void) */ +/* OBSOLETE { */ +/* OBSOLETE #ifdef SYM1 */ +/* OBSOLETE init_SigMask (); */ +/* OBSOLETE #endif */ +/* OBSOLETE } */ |