[PATCHv3 0/3] Add Type.is_scalar and Type.is_signed properties

Andrew Burgess aburgess@redhat.com
Fri Feb 25 13:55:27 GMT 2022


Thanks for all the feedback on V1, and V2.  Additionally, Simon gave
some awesome suggestions on IRC

The new V3 series is a complete rewrite, main points are:

  - New Type.is_scalar property in patch #1,

  - Now have a Type.is_signed property (patch #2), which is either
    True or False.  Attempting to read this property on a non-scalar
    type will raise a ValueError.

  - Finally, patch #3 adds a test for to cover the 'char' is different
    to 'signed char' and 'unsigned char' issue.  This characteristic
    should be detected by simply comparing types.

Thoughts?

Thanks,
Andrew

---

Andrew Burgess (3):
  gdb/python: add Type.is_scalar property
  gdb/python: add Type.is_signed property
  gdb/testsuite: add new test for comparing char types in Python

 gdb/NEWS                             |  8 +++
 gdb/doc/python.texi                  | 16 +++++
 gdb/python/py-type.c                 | 38 ++++++++++++
 gdb/testsuite/gdb.python/py-arch.exp | 15 ++++-
 gdb/testsuite/gdb.python/py-type.c   | 16 +++++
 gdb/testsuite/gdb.python/py-type.exp | 88 +++++++++++++++++++++++++++-
 6 files changed, 179 insertions(+), 2 deletions(-)

-- 
2.25.4



More information about the Gdb-patches mailing list