]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/dwarf: make some fields in dwarf2_per_cu private
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 5 Nov 2025 04:18:23 +0000 (23:18 -0500)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 7 Nov 2025 16:47:58 +0000 (11:47 -0500)
commitf0944db5ef10fc4161c3c183de4cb1c1a160fa4b
tree011557a0f060486536442f8b9c0e8b514d3352bc
parentf8d3f9bb8ae3f0e8492542332a391e399c79ebd0
gdb/dwarf: make some fields in dwarf2_per_cu private

Except for the m_length field, that is already private and has a setter,
make the fields whose values are passed through the constructor private.
The idea is that their values should be constant throughout the life of
the object.  Add some getters and update the callers.

I wasn't sure if making some bitfields public and some private would
change how they are packed, so I checked with "ptype/o", it does not.

Change-Id: I7087bebf69e44d16a36c1dd4d7edf9b8bf085343
Approved-By: Tom Tromey <tom@tromey.com>
gdb/dwarf2/aranges.c
gdb/dwarf2/index-write.c
gdb/dwarf2/read-gdb-index.c
gdb/dwarf2/read.c
gdb/dwarf2/read.h