aboutsummaryrefslogtreecommitdiff
path: root/gdb/irix5-nat.c
diff options
context:
space:
mode:
authorPeter Schauer <Peter.Schauer@mytum.de>1995-03-28 06:57:39 +0000
committerPeter Schauer <Peter.Schauer@mytum.de>1995-03-28 06:57:39 +0000
commit3f403f6ab3ffae874065b27c87d8ba52b7c820be (patch)
tree997f3ba69378a68efecfd32c315d15e256fd4283 /gdb/irix5-nat.c
parent3b94a0b8716fe1f212f02eeb828f5c1946c046f1 (diff)
downloadgdb-3f403f6ab3ffae874065b27c87d8ba52b7c820be.zip
gdb-3f403f6ab3ffae874065b27c87d8ba52b7c820be.tar.gz
gdb-3f403f6ab3ffae874065b27c87d8ba52b7c820be.tar.bz2
* alpha-nat.c, irix4-nat.c, irix5-nat.c, mipsv4-nat.c,
sparc-tdep.c (supply_gregset, supply_fpregset): Fill inaccessible registers with zero to handle recent read_register_bytes change. * irix4-nat.c, irix5-nat.c, mipsv4-nat.c (supply_gregset, fill_gregset): Fix handling of CAUSE_REGNUM. * mips-nat.c (store_inferior_registers): Handle unwritable registers when storing a single register. * config/mips/tm-irix3.h (CAUSE_REGNUM, BADVADDR_REGNUM): Fix definitions. * mdebugread.c (parse_symbol, psymtab_to_symtab_1): Clear allocated mips_extra_func_info, if the debug info is corrupt, the PDR to fill it in might be missing.
Diffstat (limited to 'gdb/irix5-nat.c')
-rw-r--r--gdb/irix5-nat.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/irix5-nat.c b/gdb/irix5-nat.c
index e2707b6..c6c8c52 100644
--- a/gdb/irix5-nat.c
+++ b/gdb/irix5-nat.c
@@ -1,5 +1,5 @@
/* Native support for the SGI Iris running IRIX version 5, for GDB.
- Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995
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.
@@ -49,6 +49,7 @@ supply_gregset (gregsetp)
{
register int regi;
register greg_t *regp = &(*gregsetp)[0];
+ static char zerobuf[MAX_REGISTER_RAW_SIZE] = {0};
for(regi = 0; regi <= CTX_RA; regi++)
supply_register (regi, (char *)(regp + regi));
@@ -57,6 +58,9 @@ supply_gregset (gregsetp)
supply_register (HI_REGNUM, (char *)(regp + CTX_MDHI));
supply_register (LO_REGNUM, (char *)(regp + CTX_MDLO));
supply_register (CAUSE_REGNUM, (char *)(regp + CTX_CAUSE));
+
+ /* Fill inaccessible registers with zero. */
+ supply_register (BADVADDR_REGNUM, zerobuf);
}
void
@@ -75,7 +79,7 @@ fill_gregset (gregsetp, regno)
*(regp + CTX_EPC) = *(greg_t *) &registers[REGISTER_BYTE (PC_REGNUM)];
if ((regno == -1) || (regno == CAUSE_REGNUM))
- *(regp + CTX_CAUSE) = *(greg_t *) &registers[REGISTER_BYTE (PS_REGNUM)];
+ *(regp + CTX_CAUSE) = *(greg_t *) &registers[REGISTER_BYTE (CAUSE_REGNUM)];
if ((regno == -1) || (regno == HI_REGNUM))
*(regp + CTX_MDHI) = *(greg_t *) &registers[REGISTER_BYTE (HI_REGNUM)];
@@ -97,6 +101,7 @@ supply_fpregset (fpregsetp)
fpregset_t *fpregsetp;
{
register int regi;
+ static char zerobuf[MAX_REGISTER_RAW_SIZE] = {0};
for (regi = 0; regi < 32; regi++)
supply_register (FP0_REGNUM + regi,
@@ -105,6 +110,7 @@ supply_fpregset (fpregsetp)
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