aboutsummaryrefslogtreecommitdiff
path: root/gdb/values.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2003-07-31 23:41:25 +0000
committerMichael Snyder <msnyder@vmware.com>2003-07-31 23:41:25 +0000
commit4e7d75111e767a216cd9230c1ce8f45f3874d133 (patch)
tree11c4ab0380d0d46b5dd58e030835a11392597522 /gdb/values.c
parent6302298482a57a625399947705ae2b3981b07d20 (diff)
downloadgdb-4e7d75111e767a216cd9230c1ce8f45f3874d133.zip
gdb-4e7d75111e767a216cd9230c1ce8f45f3874d133.tar.gz
gdb-4e7d75111e767a216cd9230c1ce8f45f3874d133.tar.bz2
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.c47
1 files changed, 21 insertions, 26 deletions
diff --git a/gdb/values.c b/gdb/values.c
index 7e7e9b1..42395c8 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);