2003-03-16 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Sun, 16 Mar 2003 20:47:40 +0000 (20:47 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sun, 16 Mar 2003 20:47:40 +0000 (20:47 +0000)
* frame.c (frame_pop): Don't call target_store_registers.  Fix
problem reported by Mark Kettenis.

gdb/ChangeLog
gdb/frame.c

index ff1989780fa4f5779bf0ed4644af4588cd44f553..72733b4a1581f20241c18e96919751bbed3590ce 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-16  Andrew Cagney  <cagney@redhat.com>
+
+       * frame.c (frame_pop): Don't call target_store_registers.  Fix
+       problem reported by Mark Kettenis.
+
 2003-03-16  Mark Kettenis  <kettenis@gnu.org>
 
        * i386-tdep.c (i386_register_type): Renamed from
 2003-03-16  Mark Kettenis  <kettenis@gnu.org>
 
        * i386-tdep.c (i386_register_type): Renamed from
index cf9349d658c24f46fdbb831cb8f8a308f2e3662f..178dfdfe5d9d2717a6cd792bcf833bce5236d96f 100644 (file)
@@ -215,6 +215,14 @@ frame_pop (struct frame_info *this_frame)
       struct regcache *scratch = regcache_xmalloc (current_gdbarch);
       struct cleanup *cleanups = make_cleanup_regcache_xfree (scratch);
       regcache_save (scratch, do_frame_unwind_register, this_frame);
       struct regcache *scratch = regcache_xmalloc (current_gdbarch);
       struct cleanup *cleanups = make_cleanup_regcache_xfree (scratch);
       regcache_save (scratch, do_frame_unwind_register, this_frame);
+      /* FIXME: cagney/2003-03-16: It should be possible to tell the
+         target's register cache that it is about to be hit with a
+         burst register transfer and that the sequence of register
+         writes should be batched.  The pair target_prepare_to_store()
+         and target_store_registers() kind of suggest this
+         functionality.  Unfortunatly, they don't implement it.  Their
+         lack of a formal definition can lead to targets writing back
+         bogus values (arguably a bug in the target code mind).  */
       /* Now copy those saved registers into the current regcache.
          Here, regcache_cpy() calls regcache_restore().  */
       regcache_cpy (current_regcache, scratch);
       /* Now copy those saved registers into the current regcache.
          Here, regcache_cpy() calls regcache_restore().  */
       regcache_cpy (current_regcache, scratch);
@@ -222,7 +230,6 @@ frame_pop (struct frame_info *this_frame)
     }
   /* We've made right mess of GDB's local state, just discard
      everything.  */
     }
   /* We've made right mess of GDB's local state, just discard
      everything.  */
-  target_store_registers (-1);
   flush_cached_frames ();
 }
 
   flush_cached_frames ();
 }