[gdb/symtab] Make comp_unit_head.length private
authorTom de Vries <tdevries@suse.de>
Fri, 30 Dec 2022 12:55:22 +0000 (13:55 +0100)
committerTom de Vries <tdevries@suse.de>
Fri, 30 Dec 2022 12:55:22 +0000 (13:55 +0100)
commitd8f52a9a9ccbf7411cf4ae487d2756826f5d0bd5
tree12ad9cf5e6bea0f74c5f0b7228aee9a3ffd5edfb
parenta984f112b015b7d33c3c91230eb4c35695926539
[gdb/symtab] Make comp_unit_head.length private

Make comp_unit_head.length private, to enforce using accessor functions.

Replace accessor function get_length with get_length_with_initial and
get_length_without_initial, to make it explicit which variant we're using.

Tested on x86_64-linux.

PR symtab/29343
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29343
gdb/dwarf2/comp-unit-head.c
gdb/dwarf2/comp-unit-head.h
gdb/dwarf2/read.c