* 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 fe88bf5..6e29310 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 366c4a1..29fa2ff 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 ());
 }