#include "demangle.h"
#include "doublest.h"
#include "gdb_assert.h"
+#include "regcache.h"
/* Prototypes for exported functions. */
/* ARGSUSED */
struct value *
-value_being_returned (struct type *valtype, char *retbuf, int struct_return)
+value_being_returned (struct type *valtype, struct regcache *retbuf,
+ int struct_return)
{
struct value *val;
CORE_ADDR addr;
-#if 0
/* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */
if (EXTRACT_STRUCT_VALUE_ADDRESS_P ())
if (struct_return)
error ("Function return value unknown.");
return value_at (valtype, addr, NULL);
}
-#endif
/* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */
if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ())
if (struct_return)
{
- addr = DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (retbuf);
+ char *buf = deprecated_grub_regcache_for_registers (retbuf);
+ addr = DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS (buf);
if (!addr)
error ("Function return value unknown.");
return value_at (valtype, addr, NULL);
val = allocate_value (valtype);
CHECK_TYPEDEF (valtype);
-#define EXTRACT_RETURN_VALUE DEPRECATED_EXTRACT_RETURN_VALUE
EXTRACT_RETURN_VALUE (valtype, retbuf, VALUE_CONTENTS_RAW (val));
return val;