2002-04-20 Daniel Jacobowitz <drow@mvista.com>

* gdbserver/inferiors.c (struct inferior_info): Add regcache_data.
        (add_inferior): Call create_register_cache.
        (clear_inferiors): Call free_register_cache.
        (inferior_regcache_data, set_inferior_regcache_data): New functions.
        * gdbserver/regcache.c (struct inferior_regcache_data): New.
        (registers): Remove.
        (get_regcache): New function.
        (create_register_cache, free_register_cache): New functions.
        (set_register_cache): Don't initialize the register cache here.
        (registers_to_string, registers_from_string, register_data): Call
        get_regcache.
        * gdbserver/regcache.h: Add prototypes.
        * gdbserver/server.h: Likewise.
This commit is contained in:
Daniel Jacobowitz
2002-04-20 17:22:48 +00:00
parent 611cb4a542
commit c04a1aa88f
5 changed files with 91 additions and 6 deletions

View File

@@ -54,6 +54,9 @@
least the size of a (void *). */
typedef long long CORE_ADDR;
/* Opaque inferior process information. */
struct inferior_info;
#include "regcache.h"
#include "gdb/signals.h"
@@ -70,14 +73,14 @@ extern char *registers;
/* From inferiors.c. */
struct inferior_info;
extern struct inferior_info *current_inferior;
extern int signal_pid;
void add_inferior (int pid);
void clear_inferiors (void);
void *inferior_target_data (struct inferior_info *);
void set_inferior_target_data (struct inferior_info *, void *);
void *inferior_regcache_data (struct inferior_info *);
void set_inferior_regcache_data (struct inferior_info *, void *);
/* Public variables in server.c */