diff options
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index dff626e..b927de5 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -2882,9 +2882,7 @@ allocate_compunit_symtab (struct objfile *objfile, const char *name) Just save the basename to avoid path issues (too long for display, relative vs absolute, etc.). */ saved_name = lbasename (name); - cu->name - = (const char *) obstack_copy0 (&objfile->objfile_obstack, saved_name, - strlen (saved_name)); + cu->name = obstack_strdup (&objfile->objfile_obstack, saved_name); COMPUNIT_DEBUGFORMAT (cu) = "unknown"; |