Remove dead definition from valops.c
[deliverable/binutils-gdb.git] / gdb / valops.c
index ed8019c62cae011a15cdd9f8085e616bc5f74bab..521f2ca983775409183a693a67970fd2a39c675f 100644 (file)
@@ -102,13 +102,6 @@ static void find_method_list (struct value **, const char *,
                              std::vector<xmethod_worker_up> *,
                              struct type **, LONGEST *);
 
-#if 0
-/* Flag for whether we want to abandon failed expression evals by
-   default.  */
-
-static int auto_abandon = 0;
-#endif
-
 int overload_resolution = 0;
 static void
 show_overload_resolution (struct ui_file *file, int from_tty,
@@ -244,7 +237,7 @@ value_cast_structs (struct type *type, struct value *v2)
      offset the pointer rather than just change its type.  */
   if (TYPE_NAME (t1) != NULL)
     {
-      v = search_struct_field (type_name_no_tag (t1),
+      v = search_struct_field (TYPE_NAME (t1),
                               v2, t2, 1);
       if (v)
        return v;
@@ -273,7 +266,7 @@ value_cast_structs (struct type *type, struct value *v2)
              && !strcmp (TYPE_NAME (real_type), TYPE_NAME (t1)))
            return v;
 
-         v = search_struct_field (type_name_no_tag (t2), v, real_type, 1);
+         v = search_struct_field (TYPE_NAME (t2), v, real_type, 1);
          if (v)
            return v;
        }
@@ -281,7 +274,7 @@ value_cast_structs (struct type *type, struct value *v2)
       /* Try downcasting using information from the destination type
         T2.  This wouldn't work properly for classes with virtual
         bases, but those were handled above.  */
-      v = search_struct_field (type_name_no_tag (t2),
+      v = search_struct_field (TYPE_NAME (t2),
                               value_zero (t1, not_lval), t1, 1);
       if (v)
        {
@@ -964,7 +957,7 @@ read_value_memory (struct value *val, LONGEST bit_offset,
       enum target_xfer_status status;
       ULONGEST xfered_partial;
 
-      status = target_xfer_partial (target_stack,
+      status = target_xfer_partial (current_top_target (),
                                    object, NULL,
                                    buffer + xfered_total * unit_size, NULL,
                                    memaddr + xfered_total,
@@ -1208,7 +1201,7 @@ value_assign (struct value *toval, struct value *fromval)
     case lval_register:
     case lval_computed:
 
-      gdb::observers::target_changed.notify (target_stack);
+      gdb::observers::target_changed.notify (current_top_target ());
 
       /* Having destroyed the frame cache, restore the selected
         frame.  */
@@ -1588,7 +1581,6 @@ value_ind (struct value *arg1)
     }
 
   error (_("Attempt to take contents of a non-pointer value."));
-  return 0;                    /* For lint -- never reached.  */
 }
 \f
 /* Create a value for an array by allocating space in GDB, copying the
@@ -3193,7 +3185,7 @@ destructor_name_p (const char *name, struct type *type)
 {
   if (name[0] == '~')
     {
-      const char *dname = type_name_no_tag_or_error (type);
+      const char *dname = type_name_or_error (type);
       const char *cp = strchr (dname, '<');
       unsigned int len;
 
@@ -3343,7 +3335,7 @@ value_struct_elt_for_reference (struct type *domain, int offset,
                                int want_address,
                                enum noside noside)
 {
-  struct type *t = curtype;
+  struct type *t = check_typedef (curtype);
   int i;
   struct value *v, *result;
 
This page took 0.028671 seconds and 4 git commands to generate.