* 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.
This commit is contained in:
Andrew Cagney
2002-07-03 20:36:54 +00:00
parent 4dd79c29b4
commit 36160dc4b2
9 changed files with 54 additions and 29 deletions

View File

@@ -34,6 +34,7 @@
#include "demangle.h"
#include "doublest.h"
#include "gdb_assert.h"
#include "regcache.h"
/* Prototypes for exported functions. */
@@ -1224,8 +1225,10 @@ value_from_double (struct type *type, DOUBLEST num)
/* ARGSUSED */
struct value *
value_being_returned (struct type *valtype, char *retbuf, int struct_return)
value_being_returned (struct type *valtype, struct regcache *buf,
int struct_return)
{
char *retbuf = deprecated_grub_regcache_for_registers (buf);
struct value *val;
CORE_ADDR addr;