+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.
+
2015-08-06 Pedro Alves <palves@redhat.com>
* server.c (captured_main): On error, print the exception message
#include "inferiors.h"
struct btrace_target_info;
+struct regcache;
struct thread_info
{
struct inferior_list_entry entry;
void *target_data;
- void *regcache_data;
+ struct regcache *regcache_data;
/* The last resume GDB requested on this thread. */
enum resume_kind last_resume_kind;
inferior->target_data = data;
}
-void *
+struct regcache *
inferior_regcache_data (struct thread_info *inferior)
{
return inferior->regcache_data;
}
void
-set_inferior_regcache_data (struct thread_info *inferior, void *data)
+set_inferior_regcache_data (struct thread_info *inferior, struct regcache *data)
{
inferior->regcache_data = data;
}
};
struct thread_info;
+struct regcache;
struct target_desc;
struct sym_cache;
struct breakpoint;
void *inferior_target_data (struct thread_info *);
void set_inferior_target_data (struct thread_info *, void *);
-void *inferior_regcache_data (struct thread_info *);
-void set_inferior_regcache_data (struct thread_info *, void *);
+struct regcache *inferior_regcache_data (struct thread_info *);
+void set_inferior_regcache_data (struct thread_info *, struct regcache *);
#endif /* INFERIORS_H */
{
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
{
struct regcache *regcache;
- regcache = (struct regcache *) inferior_regcache_data (thread);
+ regcache = inferior_regcache_data (thread);
if (regcache == NULL)
return;
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)
{