From 0ddabb4c3c6addd3027c39a76d5b623e0176f883 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Thu, 11 Sep 2003 14:00:55 +0000 Subject: [PATCH] 2003-09-11 Andrew Cagney Since the IRIX 4 configuration was forcing K&R mode it hasn't been buildable since GDB 5.0. * NEWS: Mention that IRIX 3 and IRIX 4 support were removed. * configure.host: Delete "mips-sgi-irix3*" and "mips-sgi-irix4*". * configure.tgt: Delete "mips*-sgi-*" a.k.a. irix3. * irix4-nat.c: Delete file. * config/mips/irix4.mh: Delete file. * config/mips/irix3.mh: Delete file. * config/mips/irix3.mt: Delete file. * config/mips/tm-irix3.h: Delete file. * config/mips/nm-irix3.h: Delete file. * config/mips/xm-irix3.h: Delete file. * config/mips/nm-irix4.h: Delete file. * config/mips/xm-irix4.h: Delete file. * config/mips/tm-irix5.h: Inline contents of "tm-irix3.h". --- gdb/ChangeLog | 18 ++++ gdb/NEWS | 5 ++ gdb/config/mips/irix3.mh | 5 -- gdb/config/mips/irix3.mt | 3 - gdb/config/mips/irix4.mh | 10 --- gdb/config/mips/nm-irix3.h | 38 --------- gdb/config/mips/nm-irix4.h | 65 -------------- gdb/config/mips/tm-irix3.h | 68 --------------- gdb/config/mips/tm-irix5.h | 48 ++++++++++- gdb/config/mips/xm-irix3.h | 30 ------- gdb/config/mips/xm-irix4.h | 34 -------- gdb/configure.host | 2 - gdb/configure.tgt | 1 - gdb/irix4-nat.c | 207 --------------------------------------------- 14 files changed, 70 insertions(+), 464 deletions(-) delete mode 100644 gdb/config/mips/irix3.mh delete mode 100644 gdb/config/mips/irix3.mt delete mode 100644 gdb/config/mips/irix4.mh delete mode 100644 gdb/config/mips/nm-irix3.h delete mode 100644 gdb/config/mips/nm-irix4.h delete mode 100644 gdb/config/mips/tm-irix3.h delete mode 100644 gdb/config/mips/xm-irix3.h delete mode 100644 gdb/config/mips/xm-irix4.h delete mode 100644 gdb/irix4-nat.c diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4e38baf..8546227 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,21 @@ +2003-09-11 Andrew Cagney + + Since the IRIX 4 configuration was forcing K&R mode it hasn't been + buildable since GDB 5.0. + * NEWS: Mention that IRIX 3 and IRIX 4 support were removed. + * configure.host: Delete "mips-sgi-irix3*" and "mips-sgi-irix4*". + * configure.tgt: Delete "mips*-sgi-*" a.k.a. irix3. + * irix4-nat.c: Delete file. + * config/mips/irix4.mh: Delete file. + * config/mips/irix3.mh: Delete file. + * config/mips/irix3.mt: Delete file. + * config/mips/tm-irix3.h: Delete file. + * config/mips/nm-irix3.h: Delete file. + * config/mips/xm-irix3.h: Delete file. + * config/mips/nm-irix4.h: Delete file. + * config/mips/xm-irix4.h: Delete file. + * config/mips/tm-irix5.h: Inline contents of "tm-irix3.h". + 2003-09-10 J. Brobecker * hppa-tdep.c: Include "dis-asm.h". Fixes a build failure. diff --git a/gdb/NEWS b/gdb/NEWS index bd107f6..1a2784a 100644 --- a/gdb/NEWS +++ b/gdb/NEWS @@ -9,6 +9,11 @@ The command "set prompt-escape-char" has been deleted. This command, and its very obscure effet on GDB's prompt, was never documented, tested, nor mentioned in the NEWS file. +* REMOVED configurations and files + +SGI Irix-4.x mips-sgi-irix4 or iris4 +SGI Iris (MIPS) running Irix V3: mips-sgi-irix or iris + *** Changes in GDB 6.0: * GNU/Linux support for fork, vfork, and exec. diff --git a/gdb/config/mips/irix3.mh b/gdb/config/mips/irix3.mh deleted file mode 100644 index fcb30ed..0000000 --- a/gdb/config/mips/irix3.mh +++ /dev/null @@ -1,5 +0,0 @@ -# Host: SGI Iris running irix 3.x -XM_FILE= xm-irix3.h -NAT_FILE= nm-irix3.h -NATDEPFILES= fork-child.o corelow.o infptrace.o inftarg.o mips-nat.o -XM_CLIBS=-lbsd diff --git a/gdb/config/mips/irix3.mt b/gdb/config/mips/irix3.mt deleted file mode 100644 index b3fa4dd..0000000 --- a/gdb/config/mips/irix3.mt +++ /dev/null @@ -1,3 +0,0 @@ -# Target: MIPS SGI running Irix 3 -TDEPFILES= mips-tdep.o -TM_FILE= tm-irix3.h diff --git a/gdb/config/mips/irix4.mh b/gdb/config/mips/irix4.mh deleted file mode 100644 index 4153a0e..0000000 --- a/gdb/config/mips/irix4.mh +++ /dev/null @@ -1,10 +0,0 @@ -# Host: SGI Iris running irix 4.x -XM_FILE= xm-irix4.h -NAT_FILE= nm-irix4.h -NATDEPFILES= fork-child.o irix4-nat.o corelow.o procfs.o \ - proc-api.o proc-events.o proc-flags.o proc-why.o - - -XM_CLIBS=-lbsd -lsun -# use cc in K&R mode, bump up some static compiler tables. -CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1100 diff --git a/gdb/config/mips/nm-irix3.h b/gdb/config/mips/nm-irix3.h deleted file mode 100644 index 5cd2da3..0000000 --- a/gdb/config/mips/nm-irix3.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Definitions for SGI irix3 native support. - Copyright 1991, 1992, 1993, 1996, 2000 Free Software Foundation, Inc. - - 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. */ - -/* Don't need special routines for Irix v3 -- we can use infptrace.c */ -#undef FETCH_INFERIOR_REGISTERS - -#define U_REGS_OFFSET 0 - -/* Figure out where the longjmp will land. We expect that we have just entered - longjmp and haven't yet setup the stack frame, so the args are still in the - argument regs. a0 (CALL_ARG0) points at the jmp_buf structure from which we - extract the pc (JB_PC) that we will land at. The pc is copied into ADDR. - This routine returns true on success */ - -#define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR) -extern int get_longjmp_target (CORE_ADDR *); - -/* Is this really true or is this just a leftover from a DECstation - config file? */ - -#define ONE_PROCESS_WRITETEXT diff --git a/gdb/config/mips/nm-irix4.h b/gdb/config/mips/nm-irix4.h deleted file mode 100644 index a2d9836..0000000 --- a/gdb/config/mips/nm-irix4.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Definitions for native support of irix4. - - Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000 - Free Software Foundation, Inc. - - 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. */ - -/* - * Let's use /debug instead of all this dangerous mucking about - * with ptrace(), which seems *extremely* fragile, anyway. - */ -#define USE_PROC_FS -#define CTL_PROC_NAME_FMT "/debug/%d" -#define AS_PROC_NAME_FMT "/debug/%d" -#define MAP_PROC_NAME_FMT "/debug/%d" -#define STATUS_PROC_NAME_FMT "/debug/%d" - -/* Don't need special routines for the SGI -- we can use infptrace.c */ -#undef FETCH_INFERIOR_REGISTERS - -#define U_REGS_OFFSET 0 - -/* Is this really true or is this just a leftover from a DECstation - config file? */ - -#define ONE_PROCESS_WRITETEXT - -#define TARGET_HAS_HARDWARE_WATCHPOINTS - -/* Temporary new watchpoint stuff */ -#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \ - ((type) == bp_hardware_watchpoint) - -/* When a hardware watchpoint fires off the PC will be left at the - instruction which caused the watchpoint. It will be necessary for - GDB to step over the watchpoint. */ - -#define STOPPED_BY_WATCHPOINT(W) \ - procfs_stopped_by_watchpoint(inferior_ptid) -extern int procfs_stopped_by_watchpoint (ptid_t); - -/* Use these macros for watchpoint insertion/deletion. */ -/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */ -#define target_insert_watchpoint(ADDR, LEN, TYPE) \ - procfs_set_watchpoint (inferior_ptid, ADDR, LEN, TYPE, 0) -#define target_remove_watchpoint(ADDR, LEN, TYPE) \ - procfs_set_watchpoint (inferior_ptid, ADDR, 0, 0, 0) -extern int procfs_set_watchpoint (ptid_t, CORE_ADDR, int, int, int); - -#define TARGET_REGION_SIZE_OK_FOR_HW_WATCHPOINT(SIZE) 1 diff --git a/gdb/config/mips/tm-irix3.h b/gdb/config/mips/tm-irix3.h deleted file mode 100644 index 05ab07d..0000000 --- a/gdb/config/mips/tm-irix3.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Target machine description for SGI Iris under Irix, for GDB. - Copyright 1990, 1991, 1992, 1993, 1995, 1999 - Free Software Foundation, Inc. - - 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. */ - -#include "mips/tm-mips.h" - -/* Redefine register numbers for SGI. */ - -#undef MIPS_REGISTER_NAMES -#undef FP0_REGNUM -#undef PC_REGNUM -#undef HI_REGNUM -#undef LO_REGNUM -#undef CAUSE_REGNUM -#undef BADVADDR_REGNUM -#undef FCRCS_REGNUM -#undef FCRIR_REGNUM - -/* Initializer for an array of names for registers 32 and above. - There should be NUM_REGS-32 strings in this initializer. */ - -#define MIPS_REGISTER_NAMES \ - { "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", "cause", "bad", "hi", "lo", "fsr", "fir" \ - } - -/* 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 FP0_REGNUM 32 /* Floating point register 0 (single float) */ -#define PC_REGNUM 64 /* Contains program counter */ -#define CAUSE_REGNUM 65 /* describes last exception */ -#define BADVADDR_REGNUM 66 /* bad vaddr for addressing exception */ -#define HI_REGNUM 67 /* Multiple/divide temp */ -#define LO_REGNUM 68 /* ... */ -#define FCRCS_REGNUM 69 /* FP control/status */ -#define FCRIR_REGNUM 70 /* FP implementation/revision */ - -/* Offsets for register values in _sigtramp frame. - sigcontext is immediately above the _sigtramp frame on Irix. */ -#define SIGFRAME_BASE 0x0 -#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * 4) -#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 3 * 4) -#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 3 * 4 + 32 * 4 + 4) diff --git a/gdb/config/mips/tm-irix5.h b/gdb/config/mips/tm-irix5.h index 932852e..61e809d 100644 --- a/gdb/config/mips/tm-irix5.h +++ b/gdb/config/mips/tm-irix5.h @@ -19,7 +19,53 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "mips/tm-irix3.h" +#include "mips/tm-mips.h" + +/* Redefine register numbers for SGI. */ + +#undef MIPS_REGISTER_NAMES +#undef FP0_REGNUM +#undef PC_REGNUM +#undef HI_REGNUM +#undef LO_REGNUM +#undef CAUSE_REGNUM +#undef BADVADDR_REGNUM +#undef FCRCS_REGNUM +#undef FCRIR_REGNUM + +/* Initializer for an array of names for registers 32 and above. + There should be NUM_REGS-32 strings in this initializer. */ + +#define MIPS_REGISTER_NAMES \ + { "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", "cause", "bad", "hi", "lo", "fsr", "fir" \ + } + +/* 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 FP0_REGNUM 32 /* Floating point register 0 (single float) */ +#define PC_REGNUM 64 /* Contains program counter */ +#define CAUSE_REGNUM 65 /* describes last exception */ +#define BADVADDR_REGNUM 66 /* bad vaddr for addressing exception */ +#define HI_REGNUM 67 /* Multiple/divide temp */ +#define LO_REGNUM 68 /* ... */ +#define FCRCS_REGNUM 69 /* FP control/status */ +#define FCRIR_REGNUM 70 /* FP implementation/revision */ + +/* Offsets for register values in _sigtramp frame. + sigcontext is immediately above the _sigtramp frame on Irix. */ +#define SIGFRAME_BASE 0x0 +#define SIGFRAME_PC_OFF (SIGFRAME_BASE + 2 * 4) +#define SIGFRAME_REGSAVE_OFF (SIGFRAME_BASE + 3 * 4) +#define SIGFRAME_FPREGSAVE_OFF (SIGFRAME_BASE + 3 * 4 + 32 * 4 + 4) /* FIXME: cagney/2000-04-04: Testing the _MIPS_SIM_NABI32 and _MIPS_SIM in a tm-*.h file is simply wrong! Those are diff --git a/gdb/config/mips/xm-irix3.h b/gdb/config/mips/xm-irix3.h deleted file mode 100644 index 27da9a5..0000000 --- a/gdb/config/mips/xm-irix3.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 1991, 1993, 1994, 1995 Free Software Foundation, Inc. - - 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 is for the iris. */ - -#define HAVE_TERMIO - -/* Override register locations in upage for SGI machines */ -#undef REGISTER_U_ADDR -#define REGISTER_U_ADDR(addr, blockend, regno) \ - if (regno < PC_REGNUM) \ - addr = regno; \ - else \ - addr = regno + NSIG_HNDLRS; /* Skip over signal handlers */ diff --git a/gdb/config/mips/xm-irix4.h b/gdb/config/mips/xm-irix4.h deleted file mode 100644 index 8e0bfb5..0000000 --- a/gdb/config/mips/xm-irix4.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Definitions for irix4 hosting support. - - Copyright 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. - - 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 is for the iris. */ - -#include "mips/xm-irix3.h" - -#define BROKEN_SIGINFO_H /* si_pid & si_uid are bogus */ - -/* Irix 4.0.1 and later have termios. Not sure about earlier versions. */ -#undef HAVE_TERMIO -#define HAVE_TERMIOS - -/* This enables reliable signals (and the associated setjmp/longjmp), and gives - bsdish prototypes for getpgrp/setpgrg/setgroups and initgroups. */ -#define _BSD_COMPAT diff --git a/gdb/configure.host b/gdb/configure.host index fa973af..1830fb8 100644 --- a/gdb/configure.host +++ b/gdb/configure.host @@ -99,8 +99,6 @@ m68*-sun-*) gdb_host=sun3os4 ;; # OBSOLETE mips-dec-mach3*) gdb_host=mipsm3 ;; mips-dec-*) gdb_host=decstation ;; mips-little-*) gdb_host=littlemips ;; -mips-sgi-irix3*) gdb_host=irix3 ;; -mips-sgi-irix4*) gdb_host=irix4 ;; mips-sgi-irix5*) gdb_host=irix5 ;; mips-sgi-irix6*) gdb_host=irix6 ;; mips-sony-*) gdb_host=news-mips ;; diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 8ad0af2..e18d46c 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -150,7 +150,6 @@ mips*tx39*-elf*) gdb_target=tx39 ;; mips64*-*-linux*) gdb_target=linux64 ;; mips*-sgi-irix5*) gdb_target=irix5 ;; mips*-sgi-irix6*) gdb_target=irix6 ;; -mips*-sgi-*) gdb_target=irix3 ;; mips*-*-linux*) gdb_target=linux build_gdbserver=yes ;; diff --git a/gdb/irix4-nat.c b/gdb/irix4-nat.c deleted file mode 100644 index 90229bb..0000000 --- a/gdb/irix4-nat.c +++ /dev/null @@ -1,207 +0,0 @@ -/* Native support for the SGI Iris running IRIX version 4, for GDB. - Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1996, 1999, 2000, - 2001 Free Software Foundation, Inc. - Contributed by Alessandro Forin(af@cs.cmu.edu) at CMU - and by Per Bothner(bothner@cs.wisc.edu) at U.Wisconsin. - Implemented for Irix 4.x by Garrett A. Wollman. - - 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. */ - -#include "defs.h" -#include "inferior.h" -#include "gdbcore.h" -#include "regcache.h" - -#include -#include -#include /* For JB_XXX. */ - -/* Prototypes for supply_gregset etc. */ -#include "gregset.h" - -/* Size of elements in jmpbuf */ - -#define JB_ELEMENT_SIZE 4 - -typedef unsigned int greg_t; /* why isn't this defined? */ - -static void fetch_core_registers (char *, unsigned int, int, CORE_ADDR); - -/* - * See the comment in m68k-tdep.c regarding the utility of these functions. - */ - -void -supply_gregset (gregset_t *gregsetp) -{ - register int regi; - register greg_t *regp = (greg_t *) (gregsetp->gp_regs); - char zerobuf[MAX_REGISTER_SIZE]; - memset (zerobuf, 0, MAX_REGISTER_SIZE); - - /* FIXME: somewhere, there should be a #define for the meaning - of this magic number 32; we should use that. */ - for (regi = 0; regi < 32; regi++) - supply_register (regi, (char *) (regp + regi)); - - supply_register (PC_REGNUM, (char *) &(gregsetp->gp_pc)); - supply_register (HI_REGNUM, (char *) &(gregsetp->gp_mdhi)); - supply_register (LO_REGNUM, (char *) &(gregsetp->gp_mdlo)); - supply_register (CAUSE_REGNUM, (char *) &(gregsetp->gp_cause)); - - /* Fill inaccessible registers with zero. */ - supply_register (BADVADDR_REGNUM, zerobuf); -} - -void -fill_gregset (gregset_t *gregsetp, int regno) -{ - int regi; - register greg_t *regp = (greg_t *) (gregsetp->gp_regs); - - /* same FIXME as above wrt 32 */ - for (regi = 0; regi < 32; regi++) - if ((regno == -1) || (regno == regi)) - *(regp + regi) = *(greg_t *) & deprecated_registers[REGISTER_BYTE (regi)]; - - if ((regno == -1) || (regno == PC_REGNUM)) - gregsetp->gp_pc = *(greg_t *) & deprecated_registers[REGISTER_BYTE (PC_REGNUM)]; - - if ((regno == -1) || (regno == CAUSE_REGNUM)) - gregsetp->gp_cause = *(greg_t *) & deprecated_registers[REGISTER_BYTE (CAUSE_REGNUM)]; - - if ((regno == -1) || (regno == HI_REGNUM)) - gregsetp->gp_mdhi = *(greg_t *) & deprecated_registers[REGISTER_BYTE (HI_REGNUM)]; - - if ((regno == -1) || (regno == LO_REGNUM)) - gregsetp->gp_mdlo = *(greg_t *) & deprecated_registers[REGISTER_BYTE (LO_REGNUM)]; -} - -/* - * Now we do the same thing for floating-point registers. - * We don't bother to condition on FP0_REGNUM since any - * reasonable MIPS configuration has an R3010 in it. - * - * Again, see the comments in m68k-tdep.c. - */ - -void -supply_fpregset (fpregset_t *fpregsetp) -{ - register int regi; - char zerobuf[MAX_REGISTER_SIZE]; - memset (zerobuf, 0, MAX_REGISTER_SIZE); - - for (regi = 0; regi < 32; regi++) - supply_register (FP0_REGNUM + regi, - (char *) &fpregsetp->fp_r.fp_regs[regi]); - - supply_register (FCRCS_REGNUM, (char *) &fpregsetp->fp_csr); - - /* FIXME: how can we supply FCRIR_REGNUM? SGI doesn't tell us. */ - supply_register (FCRIR_REGNUM, zerobuf); -} - -void -fill_fpregset (fpregset_t *fpregsetp, int regno) -{ - int regi; - char *from, *to; - - for (regi = FP0_REGNUM; regi < FP0_REGNUM + 32; regi++) - { - if ((regno == -1) || (regno == regi)) - { - from = (char *) &deprecated_registers[REGISTER_BYTE (regi)]; - to = (char *) &(fpregsetp->fp_r.fp_regs[regi - FP0_REGNUM]); - memcpy (to, from, REGISTER_RAW_SIZE (regi)); - } - } - - if ((regno == -1) || (regno == FCRCS_REGNUM)) - fpregsetp->fp_csr = *(unsigned *) &deprecated_registers[REGISTER_BYTE (FCRCS_REGNUM)]; -} - - -/* Figure out where the longjmp will land. - We expect the first arg to be a pointer to the jmp_buf structure from which - we extract the pc (JB_PC) that we will land at. The pc is copied into PC. - This routine returns true on success. */ - -int -get_longjmp_target (CORE_ADDR *pc) -{ - char *buf; - CORE_ADDR jb_addr; - - buf = alloca (TARGET_PTR_BIT / TARGET_CHAR_BIT); - jb_addr = read_register (A0_REGNUM); - - if (target_read_memory (jb_addr + JB_PC * JB_ELEMENT_SIZE, buf, - TARGET_PTR_BIT / TARGET_CHAR_BIT)) - return 0; - - *pc = extract_unsigned_integer (buf, TARGET_PTR_BIT / TARGET_CHAR_BIT); - - return 1; -} - -/* Provide registers to GDB from a core file. - - CORE_REG_SECT points to an array of bytes, which were obtained from - a core file which BFD thinks might contain register contents. - CORE_REG_SIZE is its size. - - Normally, WHICH says which register set corelow suspects this is: - 0 --- the general-purpose register set - 2 --- the floating-point register set - However, for Irix 4, WHICH isn't used. - - REG_ADDR is also unused. */ - -static void -fetch_core_registers (char *core_reg_sect, unsigned core_reg_size, - int which, CORE_ADDR reg_addr) -{ - if (core_reg_size != DEPRECATED_REGISTER_BYTES) - { - warning ("wrong size gregset struct in core file"); - return; - } - - memcpy ((char *) deprecated_registers, core_reg_sect, core_reg_size); -} - - -/* Register that we are able to handle irix4 core file formats. - FIXME: is this really bfd_target_unknown_flavour? */ - -static struct core_fns irix4_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_irix4 (void) -{ - add_core_fns (&irix4_core_fns); -} -- 2.7.4