From 79971d11cc7a1331d433f7cc9eb0495d07a53078 Mon Sep 17 00:00:00 2001 From: Jim Kingdon Date: Tue, 26 Oct 1993 15:49:39 +0000 Subject: [PATCH] * valops.c (value_assign): Call reinit_frame_cache when assigning to a register. --- gdb/ChangeLog | 5 +++++ gdb/valops.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1bf5dcb..a2a4b36 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 26 10:41:29 1993 Jim Kingdon (kingdon@lioth.cygnus.com) + + * valops.c (value_assign): Call reinit_frame_cache when assigning + to a register. + Mon Oct 25 11:08:59 1993 Stu Grossman (grossman at cygnus.com) * infrun.c (wait_for_inferior): Fix PC out of objfile bounds diff --git a/gdb/valops.c b/gdb/valops.c index 1c7e3b9..fd2441b 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -374,6 +374,12 @@ value_assign (toval, fromval) VALUE_CONTENTS (fromval), TYPE_LENGTH (type)); #endif } + /* Assigning to the stack pointer, frame pointer, and other + (architecture and calling convention specific) registers may + cause the frame cache to be out of date. We just do this + on all assignments to registers for simplicity; I doubt the slowdown + matters. */ + reinit_frame_cache (); break; case lval_reg_frame_relative: @@ -463,6 +469,9 @@ value_assign (toval, fromval) type = VALUE_TYPE (fromval); } + /* FIXME: This loses if fromval is a different size than toval, for + example because fromval got cast in the REGISTER_CONVERTIBLE case + above. */ val = allocate_value (type); memcpy (val, toval, VALUE_CONTENTS_RAW (val) - (char *) val); memcpy (VALUE_CONTENTS_RAW (val), VALUE_CONTENTS (fromval), -- 2.7.4