]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/NEWS
gdb/python: add Type.is_signed property
authorAndrew Burgess <aburgess@redhat.com>
Tue, 30 Nov 2021 14:35:44 +0000 (14:35 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Mon, 7 Mar 2022 19:42:08 +0000 (19:42 +0000)
commit551b380fbdad4082bc8520b1b61de883e8e4bf49
tree4eb1dabf6d52207193b92660ec85e4edebdad32e
parentee6a3d9e9496d469986a192aa374a43dffa83f96
gdb/python: add Type.is_signed property

Add a new read-only property, Type.is_signed, which is True for signed
types, and False otherwise.

This property should only be read on types for which Type.is_scalar is
true, attempting to read this property for non-scalar types will raise
a ValueError.

I chose 'is_signed' rather than 'is_unsigned' in order to match the
existing Architecture.integer_type method, which takes a 'signed'
parameter.  As far as I could find, that was the only existing
signed/unsigned selector in the Python API, so it seemed reasonable to
stay consistent.
gdb/NEWS
gdb/doc/python.texi
gdb/python/py-type.c
gdb/testsuite/gdb.python/py-arch.exp
gdb/testsuite/gdb.python/py-type.exp