diff options
Diffstat (limited to 'gdb/values.c')
-rw-r--r-- | gdb/values.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/values.c b/gdb/values.c index 225dd218bb5..28f0f4f7103 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -1229,6 +1229,7 @@ value_being_returned (struct type *valtype, char *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) @@ -1238,9 +1239,21 @@ value_being_returned (struct type *valtype, char *retbuf, int 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); + 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; |