forked from Imagelibrary/binutils-gdb
gdbserver: no point in hiding the regcache type nowadays
The regcache used to be hidden inside inferiors.c, but since the tracepoints support that it's a first class object. This also fixes a few implicit pointer conversion errors in C++ mode, caused by a few places missing the explicit cast. gdb/gdbserver/ChangeLog: 2015-08-06 Pedro Alves <palves@redhat.com> * gdbthread.h (struct regcache): Forward declare. (struct thread_info) <regcache_data>: Now a struct regcache pointer. * inferiors.c (inferior_regcache_data) (set_inferior_regcache_data): Now work with struct regcache pointers. * inferiors.h (struct regcache): Forward declare. (inferior_regcache_data, set_inferior_regcache_data): Now work with struct regcache pointers. * regcache.c (get_thread_regcache, regcache_invalidate_thread) (free_register_cache_thread): Remove struct regcache pointer casts.
This commit is contained in:
@@ -28,7 +28,7 @@ get_thread_regcache (struct thread_info *thread, int fetch)
|
||||
{
|
||||
struct regcache *regcache;
|
||||
|
||||
regcache = (struct regcache *) inferior_regcache_data (thread);
|
||||
regcache = inferior_regcache_data (thread);
|
||||
|
||||
/* Threads' regcaches are created lazily, because biarch targets add
|
||||
the main thread/lwp before seeing it stop for the first time, and
|
||||
@@ -76,7 +76,7 @@ regcache_invalidate_thread (struct thread_info *thread)
|
||||
{
|
||||
struct regcache *regcache;
|
||||
|
||||
regcache = (struct regcache *) inferior_regcache_data (thread);
|
||||
regcache = inferior_regcache_data (thread);
|
||||
|
||||
if (regcache == NULL)
|
||||
return;
|
||||
@@ -277,8 +277,7 @@ find_register_by_number (const struct target_desc *tdesc, int n)
|
||||
static void
|
||||
free_register_cache_thread (struct thread_info *thread)
|
||||
{
|
||||
struct regcache *regcache
|
||||
= (struct regcache *) inferior_regcache_data (thread);
|
||||
struct regcache *regcache = inferior_regcache_data (thread);
|
||||
|
||||
if (regcache != NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user