diff options
author | Michael Snyder <msnyder@specifix.com> | 2003-07-31 23:41:25 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@specifix.com> | 2003-07-31 23:41:25 +0000 |
commit | 7a1788223ac01aeddebe6500131fdb58c7b8f573 (patch) | |
tree | 33306fa73a53f90bd16d3755904c7781d9c471ee /gdb/values.c | |
parent | 7410622cee41fd3c90e6f582b303b3adcb0eaa9c (diff) | |
download | gdb-7a1788223ac01aeddebe6500131fdb58c7b8f573.tar.gz |
2003-07-31 Michael Snyder <msnyder@redhat.com>
* value.h, values.c, infcall.c, infcmd.c: Revert 07-30 change,
which is already covered by the new frames infrastructure.
Diffstat (limited to 'gdb/values.c')
-rw-r--r-- | gdb/values.c | 47 |
1 files changed, 21 insertions, 26 deletions
diff --git a/gdb/values.c b/gdb/values.c index 7e7e9b15534..42395c886e2 100644 --- a/gdb/values.c +++ b/gdb/values.c @@ -1212,36 +1212,31 @@ value_from_double (struct type *type, DOUBLEST num) /* ARGSUSED */ struct value * value_being_returned (struct type *valtype, struct regcache *retbuf, - int struct_return, CORE_ADDR struct_addr) + int struct_return) { struct value *val; CORE_ADDR addr; - if (struct_return) - { - if (struct_addr != 0) - { - /* Struct return addr supplied by hand_function_call. */ - return value_at (valtype, struct_addr, NULL); - } - /* If one of these is not defined, just use EXTRACT_RETURN_VALUE - instead. */ - else if (EXTRACT_STRUCT_VALUE_ADDRESS_P ()) - { - addr = EXTRACT_STRUCT_VALUE_ADDRESS (retbuf); - if (!addr) - error ("Function return value unknown."); - return value_at (valtype, addr, NULL); - } - else if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()) - { - 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); - } - } + /* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */ + if (EXTRACT_STRUCT_VALUE_ADDRESS_P ()) + if (struct_return) + { + addr = EXTRACT_STRUCT_VALUE_ADDRESS (retbuf); + if (!addr) + error ("Function return value unknown."); + return value_at (valtype, addr, NULL); + } + + /* If this is not defined, just use EXTRACT_RETURN_VALUE instead. */ + if (DEPRECATED_EXTRACT_STRUCT_VALUE_ADDRESS_P ()) + if (struct_return) + { + 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); |