aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf-index-write.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2019-06-21 14:10:14 -0400
committerSimon Marchi <simon.marchi@efficios.com>2019-06-21 14:10:14 -0400
commit51ac9db596ea9f0affa9f7db25bb179cf70beac4 (patch)
treeca356b2b22e29b2f5d11378de8d084cf9c24853b /gdb/dwarf-index-write.c
parentdc4ccb6f7f07e41616fd42625226229f0795d198 (diff)
downloadbinutils-51ac9db596ea9f0affa9f7db25bb179cf70beac4.zip
binutils-51ac9db596ea9f0affa9f7db25bb179cf70beac4.tar.gz
binutils-51ac9db596ea9f0affa9f7db25bb179cf70beac4.tar.bz2
dwarf2read: C++ify dwo_file
This patch changes dwo_file to be allocated/deallocated with new/delete, so that we can start using C++ features in it, and in struct dwo_sections. The free_dwo_file function becomes the destructor of struct dwo_file (and will disappear in upcoming patches, which will use gdb_bfd_ref_ptr for dbfd and an std::vector for sections.types). gdb/ChangeLog: * dwarf2read.h (struct dwarf2_per_objfile) <dwo_files>: Change type to htab_up. * dwarf2read.c (struct dwo_file): Initialize fields. <~dwo_file>: New. (free_dwo_file): Remove, move content to ~dwo_file. (struct dwo_file_deleter): Remove. (dwo_file_up>: Remove custom deleter. (free_dwo_files): Remove. (dwarf2_per_objfile::~dwarf2_per_objfile): Don't explicitly free dwo_files. (process_skeletonless_type_units): Call unique_ptr::get. (allocate_dwo_file_hash_table): Add deleter to created hash table. Change return type to htab_up. (lookup_dwo_file_slot): Don't memset dwo_file, call unique_ptr::get. (create_dwo_unit_in_dwp_v1): Allocate dwo_file with new. (create_dwo_unit_in_dwp_v2): Likewise. (open_and_init_dwo_file): Likewise. (free_dwo_file_from_slot): Remove.
Diffstat (limited to 'gdb/dwarf-index-write.c')
0 files changed, 0 insertions, 0 deletions