* regcache.c (realloc_register_cache): Invalidate inferior's
authorPedro Alves <palves@redhat.com>
Sun, 11 Apr 2010 01:47:48 +0000 (01:47 +0000)
committerPedro Alves <palves@redhat.com>
Sun, 11 Apr 2010 01:47:48 +0000 (01:47 +0000)
regcache before recreating it.

gdb/gdbserver/ChangeLog
gdb/gdbserver/regcache.c

index fe88bf55100bbeca7a6cfe7988fac12804e9e41f..6e29310ebbcbbb473b5a1c7a61e89b467fdef460 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-11  Pedro Alves  <pedro@codesourcery.com>
+
+       * regcache.c (realloc_register_cache): Invalidate inferior's
+       regcache before recreating it.
+
 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
 
        * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
index 366c4a1d738d7770b2ad66a47224101d9335cba8..29fa2ff30a76b32216e605ab5aacf2421f22b1eb 100644 (file)
@@ -138,6 +138,8 @@ realloc_register_cache (struct inferior_list_entry *thread_p)
   struct regcache *regcache
     = (struct regcache *) inferior_regcache_data (thread);
 
+  if (regcache != NULL)
+    regcache_invalidate_one (thread_p);
   free_register_cache (regcache);
   set_inferior_regcache_data (thread, new_register_cache ());
 }