for_each_inferior (&all_threads, regcache_invalidate_one);
}
-int
-registers_length (void)
-{
- return 2 * register_bytes;
-}
-
void *
new_register_cache (void)
{
free (regcache);
}
+static void
+realloc_register_cache (struct inferior_list_entry *thread_p)
+{
+ struct thread_info *thread = (struct thread_info *) thread_p;
+
+ free_register_cache (inferior_regcache_data (thread));
+ set_inferior_regcache_data (thread, new_register_cache ());
+}
+
void
set_register_cache (struct reg *regs, int n)
{
}
register_bytes = offset / 8;
+
+ /* Make sure PBUFSIZ is large enough to hold a full register packet. */
+ if (2 * register_bytes + 32 > PBUFSIZ)
+ fatal ("Register packet size exceeds PBUFSIZ.");
+
+ /* Re-allocate all pre-existing register caches. */
+ for_each_inferior (&all_threads, realloc_register_cache);
}
void