]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Make blockvector a little more self-contained
authorTom Tromey <tom@tromey.com>
Wed, 12 Nov 2025 19:59:13 +0000 (12:59 -0700)
committerTom Tromey <tom@tromey.com>
Wed, 19 Nov 2025 17:46:42 +0000 (10:46 -0700)
commitbf6187c92e596ef4bf934d430c570fa68a7f7176
treeafcbb4de1f7811211ef16a46503aa24bcc1e2415
parent4a40fe05bf0b7c01c2e2cb1addcaea6fa8fd917a
Make blockvector a little more self-contained

This patch changes blockvector to be a little more self-contained.

The idea here is that code outside of blockvector shouldn't really
know how it operates.  After this patch, this still doesn't fully
happen -- a couple spots check the result of map() and make decisions
based on that -- but this is a step toward making that happen.  The
longer term idea here is that this is needed to enable lazier CU
expansion.

Meanwhile, this patch seems like a simple cleanup.  Relocation is now
handled by the blockvector itself and the non-const map() method can
be removed.

There wasn't a great spot to move the section_offsets typedef.  I
chose defs.h.  I've also updated the comment there as it has been out
of date for a long time.  I've also removed an obsolete comment from
the symbol-relocation code.

Regression tested on x86-64 Fedora 40.

Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/block.c
gdb/block.h
gdb/defs.h
gdb/objfiles.c
gdb/symtab.c
gdb/symtab.h