diff options
author | Peter Schauer <Peter.Schauer@mytum.de> | 1995-03-28 06:57:39 +0000 |
---|---|---|
committer | Peter Schauer <Peter.Schauer@mytum.de> | 1995-03-28 06:57:39 +0000 |
commit | 3f403f6ab3ffae874065b27c87d8ba52b7c820be (patch) | |
tree | 997f3ba69378a68efecfd32c315d15e256fd4283 /gdb/mips-nat.c | |
parent | 3b94a0b8716fe1f212f02eeb828f5c1946c046f1 (diff) | |
download | gdb-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/mips-nat.c')
-rw-r--r-- | gdb/mips-nat.c | 27 |
1 files changed, 7 insertions, 20 deletions
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); } } |