elf_backend_init_file_header
[deliverable/binutils-gdb.git] / gdb / dwarf-index-write.c
index 153c6792f0c2d08cf7f6a24230899a04c505ba0a..48f385efb00968af5b5ceefe1a8814b9c273d3f7 100644 (file)
@@ -57,7 +57,7 @@
     GDB_INDEX_SYMBOL_KIND_SET_VALUE((cu_index), (value)); \
   } while (0)
 
-/* Ensure we don't use more than the alloted nuber of bits for the CU.  */
+/* Ensure we don't use more than the allotted number of bits for the CU.  */
 #define DW2_GDB_INDEX_CU_SET_VALUE(cu_index, value) \
   do { \
     gdb_assert (((value) & ~GDB_INDEX_CU_MASK) == 0); \
@@ -257,7 +257,7 @@ add_index_entry (struct mapped_symtab *symtab, const char *name,
      (which would allow us to avoid the duplication by only having to check
      the last entry pushed), but a symbol could have multiple kinds in one CU.
      To keep things simple we don't worry about the duplication here and
-     sort and uniqufy the list after we've processed all symbols.  */
+     sort and uniquify the list after we've processed all symbols.  */
   slot.cu_indices.push_back (cu_index_and_attrs);
 }
 
@@ -714,13 +714,14 @@ public:
           name (of the form "<MumBle>") must be entered without the
           angle brackets.  Note that the current index is unusual,
           see PR symtab/24820 for details.  */
-       const char *decoded = ada_decode (name);
+       std::string decoded = ada_decode (name);
        if (decoded[0] == '<')
          name = (char *) obstack_copy0 (&m_string_obstack,
-                                        decoded + 1,
-                                        strlen (decoded + 1) - 1);
+                                        decoded.c_str () + 1,
+                                        decoded.length () - 2);
        else
-         name = obstack_strdup (&m_string_obstack, ada_encode (decoded));
+         name = obstack_strdup (&m_string_obstack,
+                                ada_encode (decoded.c_str ()));
       }
 
     const auto insertpair
@@ -950,7 +951,7 @@ private:
   {
   public:
 
-    /* Object costructor to be called for current DWARF2_PER_OBJFILE.
+    /* Object constructor to be called for current DWARF2_PER_OBJFILE.
        All .debug_str section strings are automatically stored.  */
     debug_str_lookup (struct dwarf2_per_objfile *dwarf2_per_objfile)
       : m_abfd (dwarf2_per_objfile->objfile->obfd),
This page took 0.024643 seconds and 4 git commands to generate.