aboutsummaryrefslogtreecommitdiff
path: root/gdb/rust-lang.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2020-07-12 22:58:53 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2020-07-12 22:58:53 -0400
commit107406b7380489559c70702b8e6e9b3395c2662a (patch)
treedb0420345533a1a7e5fdb6b4dc327058c9d79fff /gdb/rust-lang.c
parentbb789949e90d4580ce0ce9034c632d3e7f39a0ac (diff)
downloadbinutils-107406b7380489559c70702b8e6e9b3395c2662a.zip
binutils-107406b7380489559c70702b8e6e9b3395c2662a.tar.gz
binutils-107406b7380489559c70702b8e6e9b3395c2662a.tar.bz2
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
Diffstat (limited to 'gdb/rust-lang.c')
0 files changed, 0 insertions, 0 deletions