summaryrefslogtreecommitdiff
path: root/gdb/regcache.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2002-07-03 20:36:54 +0000
committerAndrew Cagney <cagney@redhat.com>2002-07-03 20:36:54 +0000
commit3ada086ec8790b76f5cd8a31310d469363c17b55 (patch)
treeaf1fc0ec8b193328d93fa5584169217418d8635d /gdb/regcache.c
parentdf3c240b32b17897d56996360c3e11c1a8c30c0b (diff)
downloadgdb-3ada086ec8790b76f5cd8a31310d469363c17b55.tar.gz
* infcmd.c (print_return_value): Remove compatibility code calling
deprecated_grub_regcache_for_registers. * values.c: Include "regcache.h". (value_being_returned): Update. Use deprecated_grub_regcache_for_registers to extract the register buffer address. * value.h (value_being_returned): Change ``retbuf'' parameter to a ``struct regcache''. * Makefile.in (values.o): Add dependency on $(regcache_h). * inferior.h (run_stack_dummy): Change type of second parameter to a ``struct regcache''. * valops.c (hand_function_call): Change type of retbuf to ``struct regcache''. Allocate using regcache_xmalloc, clean using make_cleanup_regcache_xfree. * infcmd.c (run_stack_dummy): Update. Use regcache_cpu_no_passthrough instead of memcpy to copy the buffer. * regcache.c (do_regcache_xfree): New function. (make_cleanup_regcache_xfree): New function. * regcache.h (make_cleanup_regcache_xfree): Declare.
Diffstat (limited to 'gdb/regcache.c')
-rw-r--r--gdb/regcache.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/regcache.c b/gdb/regcache.c
index 70a75b5ed77..6927f3e5ee9 100644
--- a/gdb/regcache.c
+++ b/gdb/regcache.c
@@ -269,6 +269,18 @@ regcache_xfree (struct regcache *regcache)
}
void
+do_regcache_xfree (void *data)
+{
+ regcache_xfree (data);
+}
+
+struct cleanup *
+make_cleanup_regcache_xfree (struct regcache *regcache)
+{
+ return make_cleanup (do_regcache_xfree, regcache);
+}
+
+void
regcache_cpy (struct regcache *dst, struct regcache *src)
{
int i;