Stop the MIPS assembler from accepting ifunc symbols.
[deliverable/binutils-gdb.git] / gdb / valops.c
index 8af53deaa6f8c36c59b9e1af591fe070c2156279..03c6482ee1e9136a54b8a6327f67bd51ee941032 100644 (file)
@@ -1,6 +1,6 @@
 /* Perform non-arithmetic operations on values, for GDB.
 
-   Copyright (C) 1986-2019 Free Software Foundation, Inc.
+   Copyright (C) 1986-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -3039,10 +3039,15 @@ find_oload_champ (gdb::array_view<value *> args,
                              "%s # of parms %d\n",
                              functions[ix]->demangled_name (),
                              (int) parm_types.size ());
-         for (jj = 0; jj < args.size () - static_offset; jj++)
+
+         fprintf_filtered (gdb_stderr,
+                           "...Badness of length : {%d, %d}\n",
+                           bv[0].rank, bv[0].subrank);
+
+         for (jj = 1; jj < bv.size (); jj++)
            fprintf_filtered (gdb_stderr,
-                             "...Badness @ %d : %d\n",
-                             jj, bv[jj].rank);
+                             "...Badness of arg %d : {%d, %d}\n",
+                             jj, bv[jj].rank, bv[jj].subrank);
        }
 
       if (oload_champ_bv->empty ())
@@ -3849,14 +3854,10 @@ value_slice (struct value *array, int lowbound, int length)
   return slice;
 }
 
-/* Create a value for a FORTRAN complex number.  Currently most of the
-   time values are coerced to COMPLEX*16 (i.e. a complex number
-   composed of 2 doubles.  This really should be a smarter routine
-   that figures out precision intelligently as opposed to assuming
-   doubles.  FIXME: fmb  */
+/* See value.h.  */
 
 struct value *
-value_literal_complex (struct value *arg1, 
+value_literal_complex (struct value *arg1,
                       struct value *arg2,
                       struct type *type)
 {
@@ -3874,6 +3875,31 @@ value_literal_complex (struct value *arg1,
   return val;
 }
 
+/* See value.h.  */
+
+struct value *
+value_real_part (struct value *value)
+{
+  struct type *type = check_typedef (value_type (value));
+  struct type *ttype = TYPE_TARGET_TYPE (type);
+
+  gdb_assert (TYPE_CODE (type) == TYPE_CODE_COMPLEX);
+  return value_from_component (value, ttype, 0);
+}
+
+/* See value.h.  */
+
+struct value *
+value_imaginary_part (struct value *value)
+{
+  struct type *type = check_typedef (value_type (value));
+  struct type *ttype = TYPE_TARGET_TYPE (type);
+
+  gdb_assert (TYPE_CODE (type) == TYPE_CODE_COMPLEX);
+  return value_from_component (value, ttype,
+                              TYPE_LENGTH (check_typedef (ttype)));
+}
+
 /* Cast a value into the appropriate complex data type.  */
 
 static struct value *
@@ -3904,8 +3930,9 @@ cast_into_complex (struct type *type, struct value *val)
     error (_("cannot cast non-number to complex"));
 }
 
+void _initialize_valops ();
 void
-_initialize_valops (void)
+_initialize_valops ()
 {
   add_setshow_boolean_cmd ("overload-resolution", class_support,
                           &overload_resolution, _("\
This page took 0.025148 seconds and 4 git commands to generate.