diff options
author | Daniel Jacobowitz <drow@false.org> | 2002-04-20 17:22:48 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2002-04-20 17:22:48 +0000 |
commit | c04a1aa88fa42d61fafa570de6ab6ab1b7a12d27 (patch) | |
tree | ccf5d334c0eeb02b0a1f16fae3bc3641544a7d0c /gdb/gdbserver/inferiors.c | |
parent | 611cb4a54268cbb8f25175dd4900fff87eae161b (diff) | |
download | fsf-binutils-gdb-c04a1aa88fa42d61fafa570de6ab6ab1b7a12d27.zip fsf-binutils-gdb-c04a1aa88fa42d61fafa570de6ab6ab1b7a12d27.tar.gz fsf-binutils-gdb-c04a1aa88fa42d61fafa570de6ab6ab1b7a12d27.tar.bz2 |
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.
Diffstat (limited to 'gdb/gdbserver/inferiors.c')
-rw-r--r-- | gdb/gdbserver/inferiors.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/gdbserver/inferiors.c b/gdb/gdbserver/inferiors.c index f8cbd04..774798d 100644 --- a/gdb/gdbserver/inferiors.c +++ b/gdb/gdbserver/inferiors.c @@ -29,6 +29,7 @@ struct inferior_info { int pid; void *target_data; + void *regcache_data; struct inferior_info *next; }; @@ -52,6 +53,8 @@ add_inferior (int pid) if (current_inferior == NULL) current_inferior = inferiors; + create_register_cache (new_inferior); + if (signal_pid == 0) signal_pid = pid; } @@ -67,6 +70,8 @@ clear_inferiors (void) if (inf->target_data) free (inf->target_data); + if (inf->regcache_data) + free_register_cache (inf); free (inf); inf = next_inf; @@ -86,3 +91,15 @@ set_inferior_target_data (struct inferior_info *inferior, void *data) { inferior->target_data = data; } + +void * +inferior_regcache_data (struct inferior_info *inferior) +{ + return inferior->regcache_data; +} + +void +set_inferior_regcache_data (struct inferior_info *inferior, void *data) +{ + inferior->regcache_data = data; +} |