This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 17/38] Don't allocate DWO file hash on obstack
- From: Tom Tromey <tom at tromey dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tom at tromey dot com>
- Date: Wed, 22 Jan 2020 17:56:49 -0700
- Subject: [PATCH 17/38] Don't allocate DWO file hash on obstack
- References: <20200123005710.7978-1-tom@tromey.com>
This changes allocate_dwo_file_hash_table so that it does not use the
objfile obstack to store the contents of the hash table.
gdb/ChangeLog
2020-01-22 Tom Tromey <tom@tromey.com>
* dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on
obstack.
Change-Id: Ic20a618acc7277e56aa18580c68f75c793bef97b
---
gdb/ChangeLog | 5 +++++
gdb/dwarf2/read.c | 12 +++++-------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 844ff8dc54b..2f87b9d2a50 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -11462,13 +11462,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. */
--
2.17.2