]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Remove a call to blockvector::map
authorTom Tromey <tom@tromey.com>
Wed, 19 Nov 2025 09:42:34 +0000 (02:42 -0700)
committerTom Tromey <tom@tromey.com>
Sun, 23 Nov 2025 18:28:10 +0000 (11:28 -0700)
commitd4b42011bcd418f7c0cfda81223639e0d636352d
tree2533f468ced3b25904af5c76b6cbbe9c3aacec2e
parent45311dce11671fd265e7468e961b3ad5b9204b9e
Remove a call to blockvector::map

block_starting_point_at checks blockvector::map before doing a lookup.

This patch removes this call, a step toward making the blockvector API
a bit more opaque.  It arranges to find the necessary blockvector just
once, in gather_inline_frames, and then uses the 'lookup' method to
find the desired block.

Note that this is a slight change of semantics, in that the old code
looked only in the map while the new code looks in the blockvector,
regardless of whether a map was made.  However, I don't think this
should matter, and furthermore this seems like an abstraction
violation, with the inline-frame code knowing details of how buildsym
decided to create the blockvector.

in the longer run, I think only the 'lookup' method should be provided
by blockvector -- that is, separately checking the map should be
impossible.  The idea here is that eventually, for lazy CU expansion,
we will want to be able to expand the blockvector.  This may be easier
with a different underlying data structure, so perhaps the map will go
away entirely.  After this patch, one such use remains.

Regression tested on x86-64 Fedora 40.

Approved-by: Kevin Buettner <kevinb@redhat.com>
gdb/inline-frame.c