diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-07-03 21:27:55 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-07-03 21:27:55 +0000 |
commit | 049ee0e44d23a32d5de40a7259b50e78ff13a450 (patch) | |
tree | d182e96cbab1b1f3dd64b3245fa6a386d56eaa2c /gdb/values.c | |
parent | 4e0d9804feffffee56f37acb75ee8dbd9f67c4a6 (diff) | |
download | gdb-049ee0e44d23a32d5de40a7259b50e78ff13a450.zip gdb-049ee0e44d23a32d5de40a7259b50e78ff13a450.tar.gz gdb-049ee0e44d23a32d5de40a7259b50e78ff13a450.tar.bz2 |
* gdbarch.sh (struct regcache): Add opaque declaration.
(EXTRACT_RETURN_VALUE): New architecture method.
(EXTRACT_STRUCT_VALUE_ADDRESS): Ditto.
* gdbarch.h, gdbarch.c: Regenerate.
* arch-utils.c (legacy_extract_return_value): New function.
* arch-utils.h (legacy_extract_return_value): Declare.
* values.c (value_being_returned): Re-enable code handling
EXTRACT_STRUCT_VALUE_ADDRESS. Move
deprecated_grub_regcache_for_registers call to block handling
DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS.
(EXTRACT_RETURN_VALUE): Do not define.
Diffstat (limited to 'gdb/values.c')
-rw-r--r-- | gdb/values.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/values.c b/gdb/values.c index 3c577f3..debea40 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -1225,14 +1225,12 @@ value_from_double (struct type *type, DOUBLEST num) /* ARGSUSED */ struct value * -value_being_returned (struct type *valtype, struct regcache *buf, +value_being_returned (struct type *valtype, struct regcache *retbuf, int struct_return) { - char *retbuf = deprecated_grub_regcache_for_registers (buf); 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) @@ -1242,13 +1240,13 @@ value_being_returned (struct type *valtype, struct regcache *buf, 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); @@ -1256,7 +1254,6 @@ value_being_returned (struct type *valtype, struct regcache *buf, 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; |