Add "volatile" keyword to "struct gdb_exception" declaration
[deliverable/binutils-gdb.git] / gdb / buildsym.c
index 68a667a92563b91e18670e73b24816e16bf842d9..b367d1880f573fb44c05fd9225af8b67440c9c39 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.
 
@@ -32,7 +32,7 @@
 #include "gdbtypes.h"
 #include "gdb_assert.h"
 #include "complaints.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "expression.h"                /* For "enum exp_opcode" used by...  */
 #include "bcache.h"
 #include "filenames.h"         /* For DOSish file names.  */
@@ -1204,10 +1204,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
            {
This page took 0.024463 seconds and 4 git commands to generate.