Remove some usages of get_dwarf2_per_objfile
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 7 Apr 2018 17:53:42 +0000 (13:53 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 7 Apr 2018 17:53:42 +0000 (13:53 -0400)
commit12359b5e8f2a4034e1e4cd7f0b454fb03151df4c
tree84fa3b15676e8e95b8e33e8b9311dc53fdd7ae87
parentff4c9fec8413fa4e0b11ef092a86669305894a7a
Remove some usages of get_dwarf2_per_objfile

This patch removes some usages of get_dwarf2_per_objfile, where we can
get hold of the dwarf2_per_objfile object in a simpler way.  For
example, it's simpler (and slightly less work) to pass
dwarf2_per_objfile and get the objfile from it than to pass the objfile
and call get_dwarf2_per_objfile.

Ideally, get_dwarf2_per_objfile should only be used in the entry points
of the dwarf2 code, where we receive an objfile.

gdb/ChangeLog:

* dwarf2read.c (create_cus_from_index_list): Replace objfile arg
with dwarf2_per_objfile.
(create_cus_from_index): Likewise.
(create_signatured_type_table_from_index): Likewise.
(dwarf2_read_index): Likewise.
(dwarf2_initialize_objfile): Likewise.
(dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
per_cu rather than get_dwarf2_per_objfile.
gdb/ChangeLog
gdb/dwarf2read.c