/* 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.
#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. */
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
{