gdb/gdb-python-cplus-crash.patch
2010-01-13 23:37:33 +00:00

15 lines
603 B
Diff

--- gdb-7.0.1/gdb/python/py-type.c-orig 2010-01-14 00:00:29.000000000 +0100
+++ gdb-7.0.1/gdb/python/py-type.c 2010-01-14 00:14:26.000000000 +0100
@@ -177,7 +177,10 @@ convert_field (struct type *type, int fi
if (PyObject_SetAttrString (result, "artificial", arg) < 0)
goto failarg;
- arg = field < TYPE_N_BASECLASSES (type) ? Py_True : Py_False;
+ 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;