aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r--gdb/buildsym.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 9a23c8f..8e05706 100644
--- a/gdb/buildsym.c
+++ b/gdb/buildsym.c
@@ -1031,9 +1031,8 @@ buildsym_compunit::end_symtab_with_blockvector (struct block *static_block,
{
/* Reallocate the dirname on the symbol obstack. */
const char *comp_dir = m_comp_dir.get ();
- COMPUNIT_DIRNAME (cu)
- = (const char *) obstack_copy0 (&m_objfile->objfile_obstack,
- comp_dir, strlen (comp_dir));
+ COMPUNIT_DIRNAME (cu) = obstack_strdup (&m_objfile->objfile_obstack,
+ comp_dir);
}
/* Save the debug format string (if any) in the symtab. */