OSDN Git Service

* dwarf2read.c (dwarf2_build_psymtabs_hard): Copy dirname on
authorTom Tromey <tromey@redhat.com>
Fri, 29 Aug 2008 17:06:04 +0000 (17:06 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 29 Aug 2008 17:06:04 +0000 (17:06 +0000)
obstack.

gdb/ChangeLog
gdb/dwarf2read.c

index 23ec019..ece02f1 100644 (file)
@@ -1,3 +1,8 @@
+2008-08-29  Tom Tromey  <tromey@redhat.com>
+
+       * dwarf2read.c (dwarf2_build_psymtabs_hard): Copy dirname on
+       obstack.
+
 2008-08-27  Ulrich Weigand  <uweigand@de.ibm.com>
 
        * remote.c: Include "gdb_stat.h".
index 5cb444e..95a85b1 100644 (file)
@@ -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;