mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-24 02:37:23 +08:00
2009-12-03 Richard Ward <richard.j.ward1@googlemail.com>
* python/py-type.c (convert_field): New attribute "is_base_class". doc/ 2009-12-03 Richard Ward <richard.j.ward1@googlemail.com> * gdb.texinfo (Types In Python): Describe "is_base_class". testsuite/ 2009-12-03 Phil Muldoon <pmuldoon@redhat.com> PR python/10805 * gdb.python/py-type.exp: New file. * gdb.python/py-type.c: New file. * Makefile.in: Add py-type.
This commit is contained in:
@ -169,6 +169,14 @@ convert_field (struct type *type, int field)
|
||||
if (PyObject_SetAttrString (result, "artificial", arg) < 0)
|
||||
goto failarg;
|
||||
|
||||
if (TYPE_CODE (type) == TYPE_CODE_CLASS)
|
||||
arg = field < TYPE_N_BASECLASSES (type) ? Py_True : Py_False;
|
||||
else
|
||||
arg = Py_False;
|
||||
Py_INCREF (arg);
|
||||
if (PyObject_SetAttrString (result, "is_base_class", arg) < 0)
|
||||
goto failarg;
|
||||
|
||||
arg = PyLong_FromLong (TYPE_FIELD_BITSIZE (type, field));
|
||||
if (!arg)
|
||||
goto fail;
|
||||
|
Reference in New Issue
Block a user