* sparc-nat.c (fetch_inferior_registers, store_inferior_registers):

Clean up the changes of 11 Jan, as recommended by Peter Schauer.
This commit is contained in:
John Gilmore
1994-01-25 04:54:05 +00:00
parent ffbec21312
commit 2ba6182bbc
2 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,8 @@
Mon Jan 24 20:51:29 1994 John Gilmore (gnu@cygnus.com)
* sparc-nat.c (fetch_inferior_registers, store_inferior_registers):
Clean up the changes of 11 Jan, as recommended by Peter Schauer.
Fri Jan 21 19:10:44 1994 Per Bothner (bothner@kalessin.cygnus.com) Fri Jan 21 19:10:44 1994 Per Bothner (bothner@kalessin.cygnus.com)
* ch-exp.y (match_string_literal): Allow a zero-length string. * ch-exp.y (match_string_literal): Allow a zero-length string.

View File

@ -1,5 +1,5 @@
/* Functions specific to running gdb native on a Sun 4 running sunos4. /* Functions specific to running gdb native on a SPARC running SunOS4.
Copyright (C) 1989, 1992, Free Software Foundation, Inc. Copyright 1989, 1992, 1993, 1994 Free Software Foundation, Inc.
This file is part of GDB. This file is part of GDB.
@ -85,12 +85,13 @@ fetch_inferior_registers (regno)
all the regs every time it is called! FIXME. */ all the regs every time it is called! FIXME. */
register_valid[WIM_REGNUM] = 1; /* Not true yet, FIXME */ register_valid[WIM_REGNUM] = 1; /* Not true yet, FIXME */
register_valid[TBR_REGNUM] = 1; /* Not true yet, FIXME */ register_valid[TBR_REGNUM] = 1; /* Not true yet, FIXME */
register_valid[FPS_REGNUM] = 1; /* Not true yet, FIXME */
register_valid[CPS_REGNUM] = 1; /* Not true yet, FIXME */ register_valid[CPS_REGNUM] = 1; /* Not true yet, FIXME */
} }
/* Floating point registers */ /* Floating point registers */
if (regno == -1 || (regno >= FP0_REGNUM && regno <= FP0_REGNUM + 31)) if (regno == -1 ||
regno == FPS_REGNUM ||
(regno >= FP0_REGNUM && regno <= FP0_REGNUM + 31))
{ {
if (0 != ptrace (PTRACE_GETFPREGS, inferior_pid, if (0 != ptrace (PTRACE_GETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fp_registers, (PTRACE_ARG3_TYPE) &inferior_fp_registers,
@ -153,6 +154,8 @@ store_inferior_registers (regno)
wanna_store = INT_REGS + STACK_REGS; wanna_store = INT_REGS + STACK_REGS;
else if (regno < L0_REGNUM || regno > I7_REGNUM) else if (regno < L0_REGNUM || regno > I7_REGNUM)
wanna_store = INT_REGS; wanna_store = INT_REGS;
else if (regno == FPS_REGNUM)
wanna_store = FP_REGS;
else else
wanna_store = STACK_REGS; wanna_store = STACK_REGS;
} }