[PATCH 3/4] gdb: add type::length / type::set_length

Tom Tromey tom@tromey.com
Wed Sep 21 16:44:08 GMT 2022


>>>>> "Lancelot" == Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org> writes:

>> -		  TYPE_LENGTH (array_type) = (array_bitsize + 7) / 8;
>> +		  array_type->set_length ((array_bitsize + 7) / 8);

Lancelot> Do you think that while at it you could also replace the 7 and 8
Lancelot> literals with appropriate configured values?

...
Lancelot>                             / HOST_CHAR_BIT);

Normally I think the '8' is a target value, not a host value.
Like, if HOST_CHAR_BIT != 8, would this do the wrong thing?

Tom


More information about the Gdb-patches mailing list