gdb: add type::index_type / type::set_index_type
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 8 Jun 2020 19:25:50 +0000 (15:25 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Mon, 8 Jun 2020 19:25:50 +0000 (15:25 -0400)
commit262abc0d67af006a709d0935940f9c9f5f7c5ee5
treed2d824c6a17fcba7f819d61c4b5c4f9e1f4d930b
parent26417f19193444a1516c945492c5eb47dc38abe9
gdb: add type::index_type / type::set_index_type

Add the `index_type` and `set_index_type` methods on `struct type`, in
order to remove the `TYPE_INDEX_TYPE` macro.  In this patch, the
`TYPE_INDEX_TYPE` macro is changed to use `type::index_type`, so all the
call sites that are used to set the type's index type are changed to use
`type::set_index_type`.  The next patch will remove `TYPE_INDEX_TYPE`
completely.

gdb/ChangeLog:

* gdbtypes.h (struct type) <index_type, set_index_type>: New
methods.
(TYPE_INDEX_TYPE): Use type::index_type.
* gdbtypes.c (create_array_type_with_stride): Likewise.

Change-Id: I93bdca9de9f3e143d2ccea59310c63745315e18d
gdb/ChangeLog
gdb/gdbtypes.c
gdb/gdbtypes.h