Code cleanup: Split dwarf2_ranges_read to a callback
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 20 Feb 2017 19:53:20 +0000 (20:53 +0100)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 20 Feb 2017 19:59:14 +0000 (20:59 +0100)
commit5f46c5a54825aabb3f30095c84ac30aff7400ac5
treeebfd6f6e31cea782937495179372c9cbf0d7f256
parent78d4d2c538dd7975f0f130b2df842c4858c01fd3
Code cleanup: Split dwarf2_ranges_read to a callback

DWARF-5 has .debug_rnglists which is somehow similar to .debug_ranges.

This patch converts dwarf2_ranges_read to dwarf2_ranges_process which can work
with both DWARF kinds of range lists through a callback.

It also simplifies dwarf2_record_block_ranges which can benefit from it.

gdb/ChangeLog
2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

* dwarf2read.c (dwarf2_ranges_process): New function from
dwarf2_ranges_read.
(dwarf2_ranges_read, dwarf2_record_block_ranges): Use
dwarf2_ranges_process.
gdb/ChangeLog
gdb/dwarf2read.c