btrace: Fix memory leak in btrace_clear.
[deliverable/binutils-gdb.git] / gdb / cp-valprint.c
index 57d5d02a37c3fc92be42e3d7fe5c8e1f51b3d1ac..73fe03d5c9b035f12aea2192d908d3ab4f5c94d9 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for printing C++ values for GDB, the GNU debugger.
 
-   Copyright (C) 1986-2016 Free Software Foundation, Inc.
+   Copyright (C) 1986-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -490,7 +490,6 @@ cp_print_value (struct type *type, struct type *real_type,
       int skip = 0;
       struct type *baseclass = check_typedef (TYPE_BASECLASS (type, i));
       const char *basename = TYPE_NAME (baseclass);
-      const gdb_byte *base_valaddr = NULL;
       struct value *base_val = NULL;
 
       if (BASETYPE_VIA_VIRTUAL (type, i))
@@ -551,18 +550,15 @@ cp_print_value (struct type *type, struct type *real_type,
                  thisoffset = 0;
                  boffset = 0;
                  thistype = baseclass;
-                 base_valaddr = value_contents_for_printing_const (base_val);
                  do_cleanups (back_to);
                }
              else
                {
-                 base_valaddr = valaddr;
                  base_val = val;
                }
            }
          else
            {
-             base_valaddr = valaddr;
              base_val = val;
            }
        }
@@ -591,7 +587,7 @@ cp_print_value (struct type *type, struct type *real_type,
             baseclass if possible.  */
          if (!options->raw)
            result
-             = apply_ext_lang_val_pretty_printer (baseclass, base_valaddr,
+             = apply_ext_lang_val_pretty_printer (baseclass,
                                                   thisoffset + boffset,
                                                   value_address (base_val),
                                                   stream, recurse,
@@ -763,7 +759,7 @@ cp_find_class_member (struct type **self_p, int *fieldno,
 
 void
 cp_print_class_member (const gdb_byte *valaddr, struct type *type,
-                      struct ui_file *stream, char *prefix)
+                      struct ui_file *stream, const char *prefix)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (get_type_arch (type));
 
This page took 0.026534 seconds and 4 git commands to generate.