Replace dw2_get_cu/dw2_get_cutu with methods of dwarf2_per_objfile
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 7 Apr 2018 17:53:40 +0000 (13:53 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 7 Apr 2018 17:53:41 +0000 (13:53 -0400)
commitff4c9fec8413fa4e0b11ef092a86669305894a7a
treeeb4a8261fb5c6afc98f83287a0bf54882ca22b46
parent5ca3fcb669bc655e2e79866be086e8ac564e472b
Replace dw2_get_cu/dw2_get_cutu with methods of dwarf2_per_objfile

Those two functions look like good candidates to become methods of
dwarf2_per_objfile.  I did that, and added get_tu as well.  When
replacing usages of dw2_get_cutu, I changed some instances to get_cutu
and others to get_cu, when appropriate (when we know we want a CU and
not a TU).

gdb/ChangeLog:

* dwarf2read.h (struct signatured_type): Forward declare.
(struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
New methods.
* dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
(dw2_get_cutu): ...this.
(dwarf2_per_objfile::get_cu): Rename from...
(dw2_get_cu): ...this.
(dwarf2_per_objfile::get_tu): New.
(create_addrmap_from_index): Adjust.
(create_addrmap_from_aranges): Adjust.
(dw2_find_last_source_symtab): Adjust.
(dw2_map_symtabs_matching_filename): Adjust.
(dw2_symtab_iter_next): Adjust.
(dw2_print_stats): Adjust.
(dw2_expand_all_symtabs): Adjust.
(dw2_expand_symtabs_with_fullname): Adjust.
(dw2_expand_marked_cus): Adjust.
(dw_expand_symtabs_matching_file_matcher): Adjust.
(dw2_map_symbol_filenames): Adjust.
(dw2_debug_names_iterator::next): Adjust.
(dwarf2_initialize_objfile): Adjust.
(set_partial_user): Adjust.
(dwarf2_build_psymtabs_hard): Adjust.
gdb/ChangeLog
gdb/dwarf2read.c
gdb/dwarf2read.h
This page took 0.024355 seconds and 4 git commands to generate.