Make index reading functions more modular
authorSimon Marchi <simon.marchi@ericsson.com>
Tue, 7 Aug 2018 22:08:57 +0000 (18:08 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 7 Aug 2018 22:08:58 +0000 (18:08 -0400)
commit4485a1c1d8d2b4a20fca2e2b7d1aabcff383b222
tree20d179a11a3f62bdf669bd3dfd3881f70142303a
parent528e15722bf67d126e17218708c0314bcfadbf6a
Make index reading functions more modular

New in v3:

- Remove changed to dwarf-5 functions.

The read_gdb_index_from_section and read_debug_names_from_section
functions read the index content, as their names state, from sections of
object files.  A following patch will make it possible to read index
content from standalone files.

This patch therefore decouples the code that reads the index content
from the code that processes that content.  Functions
dwarf2_read_gdb_index and dwarf2_read_debug_names receive callbacks that
are responsible for providing the index contents (for both the main file
and the potential dwz file).

gdb/ChangeLog:

* dwarf2read.c (read_gdb_index_from_section): Rename to...
(read_gdb_index_from_buffer): ... this.  Remove section
parameter, add buffer parameter.
(get_gdb_index_contents_ftype,
get_gdb_index_contents_dwz_ftype): New typedefs.
(dwarf2_read_gdb_index): Add callback parameters to get the
index contents.
(get_gdb_index_contents_from_section): New.
(dwarf2_initialize_objfile): Update call to
dwarf2_read_gdb_index.
gdb/ChangeLog
gdb/dwarf2read.c
This page took 0.0249 seconds and 4 git commands to generate.