* sparc-nat.c (store_inferior_registers): Fill in all members of

inferior_fp_registers by reading them from the inferior before
	modifying and writing them back.
	Fixes unexplainable inferior FP exceptions after calls to the inferior
	or setting of floating point registers.
	* mips-tdep.c (mips_skip_prologue):  Skip move of argument register
	to register which is generated by gcc-2.4.
This commit is contained in:
Peter Schauer 1993-05-25 06:52:54 +00:00
parent 3b17ee1bad
commit 1b71de8ea4
3 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,13 @@
Mon May 24 23:50:05 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* sparc-nat.c (store_inferior_registers): Fill in all members of
inferior_fp_registers by reading them from the inferior before
modifying and writing them back.
Fixes unexplainable inferior FP exceptions after calls to the inferior
or setting of floating point registers.
* mips-tdep.c (mips_skip_prologue): Skip move of argument register
to register which is generated by gcc-2.4.
Tue May 25 00:42:39 1993 Ken Raeburn (raeburn@cygnus.com) Tue May 25 00:42:39 1993 Ken Raeburn (raeburn@cygnus.com)
* hppa-pinsn.c: Define OLD_TABLE before including opcode/hppa.h. * hppa-pinsn.c: Define OLD_TABLE before including opcode/hppa.h.

View File

@ -95,9 +95,11 @@ read_next_frame_reg(fi, regno)
immediately below the frame and we get the saved registers from there. immediately below the frame and we get the saved registers from there.
If the stack layout for sigtramp changes we might have to change these If the stack layout for sigtramp changes we might have to change these
constants and the companion fixup_sigtramp in mipsread.c */ constants and the companion fixup_sigtramp in mipsread.c */
#ifndef SIGFRAME_BASE
#define SIGFRAME_BASE 0x12c /* sizeof(sigcontext) */ #define SIGFRAME_BASE 0x12c /* sizeof(sigcontext) */
#define SIGFRAME_PC_OFF (-SIGFRAME_BASE + 2 * 4) #define SIGFRAME_PC_OFF (-SIGFRAME_BASE + 2 * 4)
#define SIGFRAME_REGSAVE_OFF (-SIGFRAME_BASE + 3 * 4) #define SIGFRAME_REGSAVE_OFF (-SIGFRAME_BASE + 3 * 4)
#endif
for (; fi; fi = fi->next) for (; fi; fi = fi->next)
if (in_sigtramp(fi->pc, 0)) { if (in_sigtramp(fi->pc, 0)) {
int offset; int offset;
@ -771,6 +773,8 @@ mips_skip_prologue(pc)
continue; /* reg != $zero */ continue; /* reg != $zero */
else if (inst == 0x03A0F021) /* move $s8,$sp */ else if (inst == 0x03A0F021) /* move $s8,$sp */
continue; continue;
else if ((inst & 0xFF9F07FF) == 0x00800021) /* move reg,$a0-$a3 */
continue;
else else
break; break;
} }

View File

@ -222,6 +222,12 @@ store_inferior_registers (regno)
if (wanna_store & FP_REGS) if (wanna_store & FP_REGS)
{ {
if (!register_valid[FP0_REGNUM+9]) abort(); if (!register_valid[FP0_REGNUM+9]) abort();
/* Initialize inferior_fp_registers members that gdb doesn't set
by reading them from the inferior. */
if (0 !=
ptrace (PTRACE_GETFPREGS, inferior_pid,
(PTRACE_ARG3_TYPE) &inferior_fp_registers, 0))
perror("ptrace_getfpregs");
memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)], memcpy (&inferior_fp_registers, &registers[REGISTER_BYTE (FP0_REGNUM)],
sizeof inferior_fp_registers.fpu_fr); sizeof inferior_fp_registers.fpu_fr);