Don't allocate DWO file hash on obstack
authorTom Tromey <tom@tromey.com>
Sat, 8 Feb 2020 20:40:54 +0000 (13:40 -0700)
committerTom Tromey <tom@tromey.com>
Sat, 8 Feb 2020 20:43:24 +0000 (13:43 -0700)
This changes allocate_dwo_file_hash_table so that it does not use the
objfile obstack to store the contents of the hash table.

2020-02-08  Tom Tromey  <tom@tromey.com>

* dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
obstack.

Change-Id: Ic20a618acc7277e56aa18580c68f75c793bef97b

gdb/ChangeLog
gdb/dwarf2/read.c

index b5c2954a885e7a8728a35051790bb8fac98c3b32..c3ec439da059b9024d7a7a09dc73641c2ba9ade0 100644 (file)
@@ -1,3 +1,8 @@
+2020-02-08  Tom Tromey  <tom@tromey.com>
+
+       * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
+       obstack.
+
 2020-02-08  Tom Tromey  <tom@tromey.com>
 
        * dwarf2/read.c (~dwarf2_per_objfile): Don't delete
index 6c698bd0fe47eae9d1202208ca1559597c38349a..a767e3b774fee8dea4a9098c9908c3277eb522a9 100644 (file)
@@ -11417,13 +11417,11 @@ allocate_dwo_file_hash_table (struct objfile *objfile)
       delete dwo_file;
     };
 
-  return htab_up (htab_create_alloc_ex (41,
-                                       hash_dwo_file,
-                                       eq_dwo_file,
-                                       delete_dwo_file,
-                                       &objfile->objfile_obstack,
-                                       hashtab_obstack_allocate,
-                                       dummy_obstack_deallocate));
+  return htab_up (htab_create_alloc (41,
+                                    hash_dwo_file,
+                                    eq_dwo_file,
+                                    delete_dwo_file,
+                                    xcalloc, xfree));
 }
 
 /* Lookup DWO file DWO_NAME.  */