diff options
author | Tom Tromey <tom@tromey.com> | 2020-02-08 13:40:54 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-02-08 13:43:24 -0700 |
commit | bc68fb1930b72d3772fadbe76d9006c799bb33e9 (patch) | |
tree | bfa271b8b179fbdda85a7b79db85d59c66217622 /gdb | |
parent | d15acc425222d23f9224bca4299319179a479801 (diff) | |
download | binutils-bc68fb1930b72d3772fadbe76d9006c799bb33e9.zip binutils-bc68fb1930b72d3772fadbe76d9006c799bb33e9.tar.gz binutils-bc68fb1930b72d3772fadbe76d9006c799bb33e9.tar.bz2 |
Don't allocate DWO file hash on obstack
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
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2/read.c | 12 |
2 files changed, 10 insertions, 7 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index b5c2954..c3ec439 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 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 line_header_hash. (handle_DW_AT_stmt_list): Update. Don't allocate on obstack. diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 6c698bd..a767e3b 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -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. */ |