Move line_header_hash to dwarf2_per_objfile
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 27 May 2020 15:14:12 +0000 (11:14 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Wed, 27 May 2020 15:19:41 +0000 (11:19 -0400)
commit39b16f87f720b5cc454eac1e668c2ce2c60bfe15
tree5fd75891054c9b9e0ecf52f68f28219cab3b76d9
parentfcf23d5b654b0fc05e99c445ebd471221a290cf4
Move line_header_hash to dwarf2_per_objfile

The `line_header_hash` field of `struct dwarf2_per_bfd` contains some
`struct line_header` objects.  A `struct line_header` objects contains
some `file_entry` objects.  A `file_entry` object contains a pointer to
the `symtab` object created from it.  The `line_header_hash` is
therefore ultimately objfile-dependent and can't be shared as-is between
objfiles.

Move it from `dwarf2_per_bfd` to `dwarf2_per_objfile`.

gdb/ChangeLog:

* dwarf2/read.h (struct dwarf2_per_bfd) <line_header_hash>: Move
to...
(struct dwarf2_per_objfile) <line_header_hash>: ... here.
* dwarf2/read.c (handle_DW_AT_stmt_list): Update.

Change-Id: I8d2ee04df4f4847c2db99061fc976c35af98ac71
gdb/ChangeLog
gdb/dwarf2/read.c
gdb/dwarf2/read.h