gdb/dwarf: remove unnecessary check in read_{rng,loc}list_index
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 2 Feb 2021 15:40:51 +0000 (10:40 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 2 Feb 2021 15:40:51 +0000 (10:40 -0500)
commit0c800c6ebc6bfc795575f3f37b27eba7ab1e7c11
tree877c5eb3551712fc2f869f0b77a67f479b611fb2
parent05787bad362024d1328c0d6f7c51244a7d6c1e75
gdb/dwarf: remove unnecessary check in read_{rng,loc}list_index

In read_rnglist_index and read_loclist_index, we check that both the
start and end of the offset that we read from the offset table are
within the section.  I think it's unecessary to do both: if the end of
the offset is within the section, then surely the start of the offset is
within it.

Remove the check for the start of the offset in both functions.

gdb/ChangeLog:

* dwarf2/read.c (read_loclist_index): Remove bound check for
start of offset.
(read_rnglist_index): Likewise.

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