gdb: add type::fields / type::set_fields
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 22 May 2020 20:55:16 +0000 (16:55 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 22 May 2020 20:55:16 +0000 (16:55 -0400)
commit3cabb6b0694b65c7b5ed800822ca08bd899fc1d1
tree58ba2ab20a5c34f30dff225f099dea06d0ef531e
parent1f704f761b34e145f5eabdc222301ce6e9ec9102
gdb: add type::fields / type::set_fields

Add the `fields` and `set_fields` methods on `struct type`, in order to
remove the `TYPE_FIELDS` macro.  In this patch, the `TYPE_FIELDS` macro
is changed to the `type::fields`, so all the call sites that use it to
set the fields array are changed to use `type::set_fields`.  The next
patch will remove `TYPE_FIELDS` entirely.

gdb/ChangeLog:

* gdbtypes.h (struct type) <fields, set_fields>: New methods.
(TYPE_FIELDS): Use type::fields.  Change all call sites that
modify the propery to use type::set_fields instead.

Change-Id: I05174ce68f2ce3fccdf5d8b469ff141f14886b33
14 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/buildsym.c
gdb/coffread.c
gdb/ctfread.c
gdb/dwarf2/read.c
gdb/eval.c
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/gnu-v3-abi.c
gdb/mdebugread.c
gdb/rust-lang.c
gdb/stabsread.c
gdb/windows-tdep.c