gdb: add type::length / type::set_length
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 30 Jul 2022 16:01:12 +0000 (12:01 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 21 Sep 2022 14:59:51 +0000 (10:59 -0400)
commitb6cdbc9a8173b9e6cc8cfc284caa0efa8129ca02
tree4b7956463a020307fcfa270fdb15f744adcf5c18
parent27710edb4e588d0360620df424dd7ee7e8cfafee
gdb: add type::length / type::set_length

Add the `length` and `set_length` methods on `struct type`, in order to remove
the `TYPE_LENGTH` macro.  In this patch, the macro is changed to use the
getter, so all the call sites of the macro that are used as a setter are
changed to use the setter method directly.  The next patch will remove the
macro completely.

Change-Id: Id1090244f15c9856969b9be5006aefe8d8897ca4
14 files changed:
gdb/ada-lang.c
gdb/coffread.c
gdb/cp-valprint.c
gdb/ctfread.c
gdb/dwarf2/read.c
gdb/eval.c
gdb/f-valprint.c
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/mdebugread.c
gdb/opencl-lang.c
gdb/rust-lang.c
gdb/stabsread.c
gdb/target-descriptions.c