Merge branch 'master' into merge-job
[deliverable/binutils-gdb.git] / gdb / dwarf2read.c
index 685d9962978ccf665d5d1f35593c7d4bc07a5155..d6471e5bc316b6185a427c585e8c3cd23b68aaf9 100644 (file)
@@ -1,6 +1,7 @@
 /* DWARF 2 debugging format support for GDB.
 
-   Copyright (C) 1994-2019 Free Software Foundation, Inc.
+   Copyright (C) 1994-2020 Free Software Foundation, Inc.
+   Copyright (C) 2019-2020 Advanced Micro Devices, Inc. All rights reserved.
 
    Adapted by Gary Funck (gary@intrepid.com), Intrepid Technology,
    Inc.  with support from Florida State University (under contract
@@ -9953,7 +9954,7 @@ fixup_go_packaging (struct dwarf2_cu *cu)
 
       sym = allocate_symbol (objfile);
       sym->set_language (language_go, &objfile->objfile_obstack);
-      SYMBOL_SET_NAMES (sym, saved_package_name, false, objfile);
+      sym->compute_and_set_names (saved_package_name, false, objfile->per_bfd);
       /* This is not VAR_DOMAIN because we want a way to ensure a lookup of,
         e.g., "main" finds the "main" module and not C's main().  */
       SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN;
@@ -10878,7 +10879,7 @@ dwarf2_compute_name (const char *name,
   /* For Fortran GDB prefers DW_AT_*linkage_name for the physname if present
      but otherwise compute it by typename_concat inside GDB.
      FIXME: Actually this is not really true, or at least not always true.
-     It's all very confusing.  SYMBOL_SET_NAMES doesn't try to demangle
+     It's all very confusing.  compute_and_set_names doesn't try to demangle
      Fortran names because there is no mangling standard.  So new_symbol
      will set the demangled name to the result of dwarf2_full_name, and it is
      the demangled name that GDB uses if it exists.  */
@@ -15487,7 +15488,7 @@ is_valid_DW_AT_defaulted (ULONGEST value)
       return true;
     }
 
-  complaint (_("unrecognized DW_AT_defaulted value (%lu)"), value);
+  complaint (_("unrecognized DW_AT_defaulted value (%s)"), pulongest (value));
   return false;
 }
 
@@ -15867,7 +15868,7 @@ is_valid_DW_AT_calling_convention_for_type (ULONGEST value)
 
     default:
       complaint (_("unrecognized DW_AT_calling_convention value "
-                  "(%lu) for a type"), value);
+                  "(%s) for a type"), pulongest (value));
       return false;
     }
 }
@@ -15893,7 +15894,7 @@ is_valid_DW_AT_calling_convention_for_subroutine (ULONGEST value)
 
     default:
       complaint (_("unrecognized DW_AT_calling_convention value "
-                  "(%lu) for a subroutine"), value);
+                  "(%s) for a subroutine"), pulongest (value));
       return false;
     }
 }
@@ -21752,7 +21753,7 @@ dwarf2_cu::start_symtab (const char *name, const char *comp_dir,
 
   list_in_scope = get_builder ()->get_file_symbols ();
 
-  get_builder ()->record_debugformat ("DWARF 2");
+  get_builder ()->record_debugformat (xstrprintf ("DWARF %d", this->header.version));
   get_builder ()->record_producer (producer);
 
   processing_has_namespace_info = false;
@@ -21873,7 +21874,7 @@ new_symbol (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
       /* Cache this symbol's name and the name's demangled form (if any).  */
       sym->set_language (cu->language, &objfile->objfile_obstack);
       linkagename = dwarf2_physname (name, die, cu);
-      SYMBOL_SET_NAMES (sym, linkagename, false, objfile);
+      sym->compute_and_set_names (linkagename, false, objfile->per_bfd);
 
       /* Fortran does not have mangling standard and the mangling does differ
         between gfortran, iFort etc.  */
This page took 0.034982 seconds and 4 git commands to generate.