diff options
-rw-r--r-- | gdb/gdbserver/ChangeLog | 10 | ||||
-rw-r--r-- | gdb/gdbserver/lynx-low.c | 2 | ||||
-rw-r--r-- | gdb/gdbserver/regcache.c | 12 | ||||
-rw-r--r-- | gdb/gdbserver/regcache.h | 4 |
4 files changed, 26 insertions, 2 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 7e9d695..e265798 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,15 @@ 2015-11-23 Joel Brobecker <brobecker@adacore.com> + * regcache.h (regcache_invalidate_pid): Add declaration. + * regcache.c (regcache_invalidate_pid): New function, extracted + from regcache_invalidate. + (regcache_invalidate): Reimplement using regcache_invalidate_pid. + Add trivial documentation comment. + * lynx-low.c: Use regcache_invalidate_pid instead of + regcache_invalidate. + +2015-11-23 Joel Brobecker <brobecker@adacore.com> + * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t and Elf64_auxv_t if the target is Android. diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c index 0582399..36ab0a3 100644 --- a/gdb/gdbserver/lynx-low.c +++ b/gdb/gdbserver/lynx-low.c @@ -343,7 +343,7 @@ lynx_resume (struct thread_resume *resume_info, size_t n) if (ptid_equal (ptid, minus_one_ptid)) ptid = thread_to_gdb_id (current_thread); - regcache_invalidate (); + regcache_invalidate_pid (ptid_get_pid (ptid)); errno = 0; lynx_ptrace (request, ptid, 1, signal, 0); diff --git a/gdb/gdbserver/regcache.c b/gdb/gdbserver/regcache.c index e11b173..b9311fe 100644 --- a/gdb/gdbserver/regcache.c +++ b/gdb/gdbserver/regcache.c @@ -107,13 +107,23 @@ regcache_invalidate_one (struct inferior_list_entry *entry, return 0; } +/* See regcache.h. */ + +void +regcache_invalidate_pid (int pid) +{ + find_inferior (&all_threads, regcache_invalidate_one, &pid); +} + +/* See regcache.h. */ + void regcache_invalidate (void) { /* Only update the threads of the current process. */ int pid = ptid_get_pid (current_thread->entry.id); - find_inferior (&all_threads, regcache_invalidate_one, &pid); + regcache_invalidate_pid (pid); } #endif diff --git a/gdb/gdbserver/regcache.h b/gdb/gdbserver/regcache.h index d2d9fc7..a0be95e 100644 --- a/gdb/gdbserver/regcache.h +++ b/gdb/gdbserver/regcache.h @@ -74,6 +74,10 @@ void free_register_cache (struct regcache *regcache); void regcache_invalidate_thread (struct thread_info *); +/* Invalidate cached registers for all threads of the given process. */ + +void regcache_invalidate_pid (int pid); + /* Invalidate cached registers for all threads of the current process. */ |