Record explicit block ranges from dwarf2read.c
authorKevin Buettner <kevinb@redhat.com>
Thu, 23 Aug 2018 23:00:49 +0000 (16:00 -0700)
committerKevin Buettner <kevinb@redhat.com>
Thu, 23 Aug 2018 23:12:15 +0000 (16:12 -0700)
commit2d5f09ec45f81a9c89a98c4629662d812774dfd0
tree7e18e1448aa123f01f74352cd246566ef0200030
parent26457a9cf3c0ae49a3a2d0d0d0f25e2658b5f0d4
Record explicit block ranges from dwarf2read.c

This change sets BLOCK_RANGES for the block under consideration by
calling make_blockranges().  This action is performed in
dwarf2_record_block_ranges().

It should be noted that dwarf2_record_block_ranges() already does some
recording of the range via a call to record_block_range().  The ranges
recorded in that fashion end up in the address map associated with the
blockvector for the compilation unit's symtab.  Given an address, the
addrmap provides a fast way of finding the block containing that
address.  The address map does not, however, provide a convenient way
of determining which address ranges make up a particular block.

While reading a set of ranges, a vector of pairs is used to collect
the starting and ending addresses for each range in the block.  Once
all of the ranges for a block have been collected, make_blockranges()
is called to fill in BLOCK_RANGES for the block.

The ranges are stored for the block in the order that they're read
from the debug info.  For DWARF, the starting address of the first
range of the block will be the entry pc in cases where DW_AT_entry_pc
is not present.  (Well, that would ideally be the case.  At the moment
DW_AT_entry_pc is not being handled.)

gdb/ChangeLog:

* dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
for block.
gdb/ChangeLog
gdb/dwarf2read.c
This page took 0.024351 seconds and 4 git commands to generate.