From 3f403f6ab3ffae874065b27c87d8ba52b7c820be Mon Sep 17 00:00:00 2001 From: Peter Schauer Date: Tue, 28 Mar 1995 06:57:39 +0000 Subject: * 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. --- gdb/mips-nat.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) (limited to 'gdb/mips-nat.c') diff --git a/gdb/mips-nat.c b/gdb/mips-nat.c index 5e34f92..4d1b4a0 100644 --- a/gdb/mips-nat.c +++ b/gdb/mips-nat.c @@ -1,5 +1,5 @@ /* 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. @@ -101,11 +101,13 @@ store_inferior_registers (regno) 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, @@ -119,22 +121,7 @@ store_inferior_registers (regno) 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); } } -- cgit v1.1