aboutsummaryrefslogtreecommitdiff
path: root/gdb/mipsv4-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/mipsv4-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/mipsv4-nat.c')
-rw-r--r--gdb/mipsv4-nat.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gdb/mipsv4-nat.c b/gdb/mipsv4-nat.c
index b9c0692..717119c 100644
--- a/gdb/mipsv4-nat.c
+++ b/gdb/mipsv4-nat.c
@@ -1,5 +1,5 @@
/* Native support for MIPS running SVR4, for GDB.
- Copyright 1994 Free Software Foundation, Inc.
+ Copyright 1994, 1995 Free Software Foundation, Inc.
This file is part of GDB.
@@ -43,14 +43,22 @@ supply_gregset (gregsetp)
{
register int regi;
register greg_t *regp = &(*gregsetp)[0];
+ static char zerobuf[MAX_REGISTER_RAW_SIZE] = {0};
- for(regi = 0; regi <= CXT_RA; regi++)
+ for (regi = 0; regi <= CXT_RA; regi++)
supply_register (regi, (char *)(regp + regi));
supply_register (PC_REGNUM, (char *)(regp + CXT_EPC));
supply_register (HI_REGNUM, (char *)(regp + CXT_MDHI));
supply_register (LO_REGNUM, (char *)(regp + CXT_MDLO));
supply_register (CAUSE_REGNUM, (char *)(regp + CXT_CAUSE));
+
+ /* Fill inaccessible registers with zero. */
+ supply_register (PS_REGNUM, zerobuf);
+ supply_register (BADVADDR_REGNUM, zerobuf);
+ supply_register (FP_REGNUM, zerobuf);
+ for (regi = FIRST_EMBED_REGNUM; regi <= LAST_EMBED_REGNUM; regi++)
+ supply_register (regi, zerobuf);
}
void
@@ -69,7 +77,7 @@ fill_gregset (gregsetp, regno)
*(regp + CXT_EPC) = *(greg_t *) &registers[REGISTER_BYTE (PC_REGNUM)];
if ((regno == -1) || (regno == CAUSE_REGNUM))
- *(regp + CXT_CAUSE) = *(greg_t *) &registers[REGISTER_BYTE (PS_REGNUM)];
+ *(regp + CXT_CAUSE) = *(greg_t *) &registers[REGISTER_BYTE (CAUSE_REGNUM)];
if ((regno == -1) || (regno == HI_REGNUM))
*(regp + CXT_MDHI) = *(greg_t *) &registers[REGISTER_BYTE (HI_REGNUM)];
@@ -91,6 +99,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,
@@ -99,6 +108,7 @@ supply_fpregset (fpregsetp)
supply_register (FCRCS_REGNUM, (char *)&fpregsetp->fp_csr);
/* FIXME: how can we supply FCRIR_REGNUM? The ABI doesn't tell us. */
+ supply_register (FCRIR_REGNUM, zerobuf);
}
void