* strerror.c: Revert last change. Declare static sys_nerr
[deliverable/binutils-gdb.git] / gdb / values.c
index c0027cb875114989880da735eb57e5442591b393..3b1bca8a7860c72bd5a681a1dd6a60200862eebb 100644 (file)
@@ -1202,55 +1202,25 @@ value_from_double (struct type *type, DOUBLEST num)
   return val;
 }
 \f
-/* Deal with the value that is "about to be returned".  */
-
-/* Return the value that a function returning now
-   would be returning to its caller, assuming its type is VALTYPE.
-   RETBUF is where we look for what ought to be the contents
-   of the registers (in raw form).  This is because it is often
-   desirable to restore old values to those registers
-   after saving the contents of interest, and then call
-   this function using the saved values.
-   struct_return is non-zero when the function in question is
-   using the structure return conventions on the machine in question;
-   0 when it is using the value returning conventions (this often
-   means returning pointer to where structure is vs. returning value). */
-
-/* ARGSUSED */
-struct value *
-value_being_returned (struct type *valtype, struct regcache *retbuf,
-                     int struct_return)
-{
-  struct value *val;
-  CORE_ADDR addr;
+/* Deal with the value that is "about to be returned".
 
-  /* 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);
-      }
+   Return the value that a function, using the register convention,
+   returning now would be returning to its caller, assuming its type
+   is VALTYPE.  RETBUF is where we look for what ought to be the
+   contents of the registers (in raw form).  This is because it is
+   often desirable to restore old values to those registers after
+   saving the contents of interest, and then call this function using
+   the saved values.  */
 
-  /* 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);
+struct value *
+register_value_being_returned (struct type *valtype, struct regcache *retbuf)
+{
+  struct value *val = allocate_value (valtype);
   CHECK_TYPEDEF (valtype);
-  /* If the function returns void, don't bother fetching the return value.  */
+  /* If the function returns void, don't bother fetching the return
+     value.  */
   if (TYPE_CODE (valtype) != TYPE_CODE_VOID)
     EXTRACT_RETURN_VALUE (valtype, retbuf, VALUE_CONTENTS_RAW (val));
-
   return val;
 }
 
This page took 0.024447 seconds and 4 git commands to generate.