+Mon Mar 27 22:51:54 1995 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
+
+ * 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.
+
Mon Mar 27 14:43:00 1995 Kung Hsu <kung@mexican.cygnus.com>
* vx-share/regPacket.h: a new file interfacing with vxworks.
{
register int regi;
register long *regp = gregsetp->regs;
+ static char zerobuf[MAX_REGISTER_RAW_SIZE] = {0};
for (regi = 0; regi < 31; regi++)
supply_register (regi, (char *)(regp + regi));
supply_register (PC_REGNUM, (char *)(regp + 31));
+
+ /* Fill inaccessible registers with zero. */
+ supply_register (ZERO_REGNUM, zerobuf);
+ supply_register (FP_REGNUM, zerobuf);
}
void
/* Native support for the SGI Iris running IRIX version 4, for GDB.
- Copyright 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+ Copyright 1988, 1989, 1990, 1991, 1992, 1993, 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.
Implemented for Irix 4.x by Garrett A. Wollman.
{
register int regi;
register greg_t *regp = (greg_t *)(gregsetp->gp_regs);
+ static char zerobuf[MAX_REGISTER_RAW_SIZE] = {0};
/* FIXME: somewhere, there should be a #define for the meaning
of this magic number 32; we should use that. */
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 (PS_REGNUM, (char *)&(gregsetp->gp_cause));
+ supply_register (CAUSE_REGNUM, (char *)&(gregsetp->gp_cause));
+
+ /* Fill inaccessible registers with zero. */
+ supply_register (BADVADDR_REGNUM, zerobuf);
}
void
if ((regno == -1) || (regno == PC_REGNUM))
gregsetp->gp_pc = *(greg_t *) ®isters[REGISTER_BYTE (PC_REGNUM)];
- if ((regno == -1) || (regno == PS_REGNUM))
- gregsetp->gp_cause = *(greg_t *) ®isters[REGISTER_BYTE (PS_REGNUM)];
+ if ((regno == -1) || (regno == CAUSE_REGNUM))
+ gregsetp->gp_cause = *(greg_t *) ®isters[REGISTER_BYTE (CAUSE_REGNUM)];
if ((regno == -1) || (regno == HI_REGNUM))
gregsetp->gp_mdhi = *(greg_t *) ®isters[REGISTER_BYTE (HI_REGNUM)];
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,
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
/* 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.
{
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));
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
*(regp + CTX_EPC) = *(greg_t *) ®isters[REGISTER_BYTE (PC_REGNUM)];
if ((regno == -1) || (regno == CAUSE_REGNUM))
- *(regp + CTX_CAUSE) = *(greg_t *) ®isters[REGISTER_BYTE (PS_REGNUM)];
+ *(regp + CTX_CAUSE) = *(greg_t *) ®isters[REGISTER_BYTE (CAUSE_REGNUM)];
if ((regno == -1) || (regno == HI_REGNUM))
*(regp + CTX_MDHI) = *(greg_t *) ®isters[REGISTER_BYTE (HI_REGNUM)];
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,
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
e = ((struct mips_extra_func_info *)
obstack_alloc (¤t_objfile->symbol_obstack,
sizeof (struct mips_extra_func_info)));
+ memset ((PTR) e, 0, sizeof (struct mips_extra_func_info));
SYMBOL_VALUE (s) = (long) e;
e->numargs = top_stack->numargs;
e->pdr.framereg = -1;
obstack_alloc (¤t_objfile->symbol_obstack,
sizeof (struct mips_extra_func_info)));
struct symbol *s = new_symbol (MIPS_EFI_SYMBOL_NAME);
+
+ memset ((PTR) e, 0, sizeof (struct mips_extra_func_info));
SYMBOL_NAMESPACE (s) = LABEL_NAMESPACE;
SYMBOL_CLASS (s) = LOC_CONST;
SYMBOL_TYPE (s) = builtin_type_void;
/* Low level DECstation interface to ptrace, for GDB when running native.
- Copyright 1988, 1989, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1988, 1989, 1991, 1992, 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.
register unsigned int regaddr;
char buf[80];
- if (regno == 0)
- return;
-
if (regno > 0)
{
+ if (regno == ZERO_REGNUM || regno == PS_REGNUM
+ || regno == BADVADDR_REGNUM || regno == CAUSE_REGNUM
+ || regno == FCRIR_REGNUM || regno == FP_REGNUM
+ || (regno >= FIRST_EMBED_REGNUM && regno <= LAST_EMBED_REGNUM))
+ return;
regaddr = REGISTER_PTRACE_ADDR (regno);
errno = 0;
ptrace (PT_WRITE_U, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
else
{
for (regno = 0; regno < NUM_REGS; regno++)
- {
- if (regno == ZERO_REGNUM || regno == PS_REGNUM
- || regno == BADVADDR_REGNUM || regno == CAUSE_REGNUM
- || regno == FCRIR_REGNUM || regno == FP_REGNUM
- || (regno >= FIRST_EMBED_REGNUM && regno <= LAST_EMBED_REGNUM))
- continue;
- regaddr = REGISTER_PTRACE_ADDR (regno);
- errno = 0;
- ptrace (6, inferior_pid, (PTRACE_ARG3_TYPE) regaddr,
- read_register (regno));
- if (errno != 0)
- {
- sprintf (buf, "writing all regs, number %d", regno);
- perror_with_name (buf);
- }
- }
+ store_inferior_registers (regno);
}
}
/* 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.
{
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
*(regp + CXT_EPC) = *(greg_t *) ®isters[REGISTER_BYTE (PC_REGNUM)];
if ((regno == -1) || (regno == CAUSE_REGNUM))
- *(regp + CXT_CAUSE) = *(greg_t *) ®isters[REGISTER_BYTE (PS_REGNUM)];
+ *(regp + CXT_CAUSE) = *(greg_t *) ®isters[REGISTER_BYTE (CAUSE_REGNUM)];
if ((regno == -1) || (regno == HI_REGNUM))
*(regp + CXT_MDHI) = *(greg_t *) ®isters[REGISTER_BYTE (HI_REGNUM)];
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,
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