gdb/dwarf: make read_{loc,rng}list_index return sect_offset
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 2 Feb 2021 15:40:52 +0000 (10:40 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 2 Feb 2021 15:42:12 +0000 (10:42 -0500)
commite57933dc9cda3292f0baadbf80ff07d398566abb
tree968dec25a70d80a2fb73c3ffcffa4bbf1517bed3
parent2b0c7f41d1d90811fbfd71c523aaa157c8f21448
gdb/dwarf: make read_{loc,rng}list_index return sect_offset

I think it's wrong that read_loclist_index and read_rnglist_index return
a CORE_ADDR.  A CORE_ADDR is an address in the program.  These functions
return offset in sections (.debug_loclists and .debug_rnglists).  I
think sect_offset is more appropriate.

I'm wondering if struct attribute should have a "set_sect_offset"
method, that takes  a sect_offset parameter, or if it's better to be
left as a simple "unsigned".

gdb/ChangeLog:

* dwarf2/read.c (read_loclist_index, read_rnglist_index): Return
a sect_offset.
(read_attribute_reprocess): Adjust.

Change-Id: I0e22e0864130fb490072b41ae099762918b8ad4d
gdb/ChangeLog
gdb/dwarf2/read.c