From: Tom Tromey Date: Fri, 29 Aug 2008 17:06:05 +0000 (+0000) Subject: * dwarf2read.c (dwarf2_build_psymtabs_hard): Copy dirname on X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a683b3c093845042fd839b867385ad8348c7e51a;p=binutils-gdb.git * dwarf2read.c (dwarf2_build_psymtabs_hard): Copy dirname on obstack. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 23ec019a191..ece02f1907a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-08-29 Tom Tromey + + * dwarf2read.c (dwarf2_build_psymtabs_hard): Copy dirname on + obstack. + 2008-08-27 Ulrich Weigand * remote.c: Include "gdb_stat.h". diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 5cb444ebdf4..95a85b1ad53 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -1529,7 +1529,9 @@ dwarf2_build_psymtabs_hard (struct objfile *objfile, int mainline) objfile->static_psymbols.next); if (comp_unit_die.dirname) - pst->dirname = xstrdup (comp_unit_die.dirname); + pst->dirname = obsavestring (comp_unit_die.dirname, + strlen (comp_unit_die.dirname), + &objfile->objfile_obstack); pst->read_symtab_private = (char *) this_cu;