The attached patch wraps PyObject_GetAttrString and PyObject_HasAttrString in internal functions which have const qualifier for the second argument. This is required because these functions were missing the const qualifier in Python-2.4. ChangeLog 2014-06-09 Siva Chandra Reddy * python/python-internal.h (gdb_PyObject_GetAttrString) (gdb_PyObject_HasAttrString): New inline function definitions. * py-value.c (get_field_flag): Remove the now unnecessary cast to (char *) of the second argument to PyObject_GetAttrString.