Add NaCl (NativeClient) specific classes Target_mips_nacl and
[external/binutils.git] / gdb / buildsym.c
index 68a667a..2b00a1a 100644 (file)
@@ -1,5 +1,5 @@
 /* Support routines for building symbol tables in GDB's internal format.
-   Copyright (C) 1986-2013 Free Software Foundation, Inc.
+   Copyright (C) 1986-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,9 +30,7 @@
 #include "symfile.h"
 #include "objfiles.h"
 #include "gdbtypes.h"
-#include "gdb_assert.h"
 #include "complaints.h"
-#include "gdb_string.h"
 #include "expression.h"                /* For "enum exp_opcode" used by...  */
 #include "bcache.h"
 #include "filenames.h"         /* For DOSish file names.  */
@@ -1204,10 +1202,10 @@ end_symtab_from_static_block (struct block *static_block,
          if (subfile->dirname)
            {
              /* Reallocate the dirname on the symbol obstack.  */
-             symtab->dirname = (char *)
-               obstack_alloc (&objfile->objfile_obstack,
-                              strlen (subfile->dirname) + 1);
-             strcpy (symtab->dirname, subfile->dirname);
+             symtab->dirname =
+               obstack_copy0 (&objfile->objfile_obstack,
+                              subfile->dirname,
+                              strlen (subfile->dirname));
            }
          else
            {
@@ -1390,7 +1388,7 @@ set_missing_symtab (struct pending *pending_list, struct symtab *symtab)
 void
 augment_type_symtab (struct objfile *objfile, struct symtab *primary_symtab)
 {
-  struct blockvector *blockvector = primary_symtab->blockvector;
+  const struct blockvector *blockvector = primary_symtab->blockvector;
 
   if (context_stack_depth > 0)
     {