]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
gdb: remove TYPE_BIT_STRIDE
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 13 Jul 2020 02:58:53 +0000 (22:58 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Mon, 13 Jul 2020 02:58:53 +0000 (22:58 -0400)
commit107406b7380489559c70702b8e6e9b3395c2662a
treedb0420345533a1a7e5fdb6b4dc327058c9d79fff
parentbb789949e90d4580ce0ce9034c632d3e7f39a0ac
gdb: remove TYPE_BIT_STRIDE

Remove the macro and add a `bit_stride` method to `struct range_bounds`,
which does the byte -> bit conversion if needed.

Add a convenience `bit_stride` method to `struct type` as well.  I don't
really understand why the bit/byte stride is stored in the data
structure for bounds.  Maybe it was just put there because
`range_bounds` was already a data structure specific to TYPE_CODE_RANGE
types?  If the stride is indeed not related to the bounds, then I find
it more logical to do `my_range_type->bit_stride ()` than
`my_range_type->bounds ()->bit_stride ()`, hence the convenience
function on `struct type`.

gdb/ChangeLog:

* gdbtypes.h (struct range_bounds) <bit_stride>: New method.
(struct type) <bit_stride>: New method.
(TYPE_BIT_STRIDE): Remove.
* gdbtypes.c (update_static_array_size): Use type::bit_stride.

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