summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/regcache.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-02-27 03:31:05 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-02-27 03:31:05 +0000
commit5c856ad70c736af8ce32e59c9dcd91022bc79fe2 (patch)
tree1c69e9327612ea6b94e7644370839dd79c8bf0ef /gdb/gdbserver/regcache.c
parentb17e6ec7f9ac5bf837bd0dc64f6cc2839a80f5be (diff)
downloadgdb-5c856ad70c736af8ce32e59c9dcd91022bc79fe2.tar.gz
* configure.srv [s390x-*-linux*]: Set srv_regobj to include both
reg-s390.o and reg-s390x.o. * linux-low.c (new_inferior): New global variable. (linux_create_inferior, linux_attach): Set it. (linux_wait_for_process): Call the_low_target.arch_setup after the target has stopped for the first time. (initialize_low): Do not call the_low_target.arch_setup. * linux-s390-low.c (s390_get_pc): Support bi-arch operation. (s390_set_pc): Likewise. (s390_arch_setup): New function. (the_low_target): Use s390_arch_setup as arch_setup routine. * regcache.c (realloc_register_cache): New function. (set_register_cache): Call it for each existing regcache.
Diffstat (limited to 'gdb/gdbserver/regcache.c')
-rw-r--r--gdb/gdbserver/regcache.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/gdbserver/regcache.c b/gdb/gdbserver/regcache.c
index 7b2285a4c3b..a42d95ba9f0 100644
--- a/gdb/gdbserver/regcache.c
+++ b/gdb/gdbserver/regcache.c
@@ -121,6 +121,15 @@ free_register_cache (void *regcache_p)
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)
{
@@ -137,6 +146,9 @@ set_register_cache (struct reg *regs, int n)
}
register_bytes = offset / 8;
+
+ /* Re-allocate all pre-existing register caches. */
+ for_each_inferior (&all_threads, realloc_register_cache);
}
void