[PATCHv2 2/2] gdb/python: add Type.signedness attribute
Simon Marchi
simon.marchi@polymtl.ca
Wed Dec 8 03:13:40 GMT 2021
> +@vindex TYPE_SIGNEDNESS_NONE
> +@item gdb.TYPE_SIGNEDNESS_NONE
> +This type is considered neither signed, or unsigned. This applies to
> +all non-scalar types (e.g.@: c language structs), but can sometimes be
> +the value return for scalar type, one example of where this can be
> +seen is in C++, where @code{char}, @code{signed char}, and
> +@code{unsigned char} are all considered distinct types.
I'm curious, why would type `unsigned char` not return
gdb.TYPE_SIGNEDNESS_UNSIGNED? I see the corresponding code in
gdbtypes.c, with the m_flag_nosign flag, so I understand that you would
implementation the Python binding based on that, but I am wondering
about the historical reason.
Simon
More information about the Gdb-patches
mailing list