From 5d267c4c705d1d22e21b0dde92750b3afe699681 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Sun, 11 Apr 2010 01:47:48 +0000 Subject: [PATCH] * regcache.c (realloc_register_cache): Invalidate inferior's regcache before recreating it. --- gdb/gdbserver/ChangeLog | 5 +++++ gdb/gdbserver/regcache.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index fe88bf5..6e29310 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2010-04-11 Pedro Alves + + * regcache.c (realloc_register_cache): Invalidate inferior's + regcache before recreating it. + 2010-04-09 Pedro Alves * tracepoint.c (cmd_qtstatus): Report trace buffer circularity. diff --git a/gdb/gdbserver/regcache.c b/gdb/gdbserver/regcache.c index 366c4a1..29fa2ff 100644 --- a/gdb/gdbserver/regcache.c +++ b/gdb/gdbserver/regcache.c @@ -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 ()); } -- 2.7.4