PR python/10953:
* python/py-type.c (typy_fields): Call check_typedef. (typy_template_argument): Add TRY_CATCH.
This commit is contained in:
parent
702c271136
commit
05d0e1e74e
2 changed files with 20 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2010-08-23 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
PR python/10953:
|
||||||
|
* python/py-type.c (typy_fields): Call check_typedef.
|
||||||
|
(typy_template_argument): Add TRY_CATCH.
|
||||||
|
|
||||||
2010-08-23 Tom Tromey <tromey@redhat.com>
|
2010-08-23 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
PR python/11915:
|
PR python/11915:
|
||||||
|
|
|
@ -216,6 +216,13 @@ typy_fields (PyObject *self, PyObject *args)
|
||||||
PyObject *result;
|
PyObject *result;
|
||||||
int i;
|
int i;
|
||||||
struct type *type = ((type_object *) self)->type;
|
struct type *type = ((type_object *) self)->type;
|
||||||
|
volatile struct gdb_exception except;
|
||||||
|
|
||||||
|
TRY_CATCH (except, RETURN_MASK_ALL)
|
||||||
|
{
|
||||||
|
CHECK_TYPEDEF (type);
|
||||||
|
}
|
||||||
|
GDB_PY_HANDLE_EXCEPTION (except);
|
||||||
|
|
||||||
/* We would like to make a tuple here, make fields immutable, and
|
/* We would like to make a tuple here, make fields immutable, and
|
||||||
then memoize the result (and perhaps make Field.type() lazy).
|
then memoize the result (and perhaps make Field.type() lazy).
|
||||||
|
@ -641,9 +648,13 @@ typy_template_argument (PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRY_CATCH (except, RETURN_MASK_ALL)
|
||||||
|
{
|
||||||
type = check_typedef (type);
|
type = check_typedef (type);
|
||||||
if (TYPE_CODE (type) == TYPE_CODE_REF)
|
if (TYPE_CODE (type) == TYPE_CODE_REF)
|
||||||
type = check_typedef (TYPE_TARGET_TYPE (type));
|
type = check_typedef (TYPE_TARGET_TYPE (type));
|
||||||
|
}
|
||||||
|
GDB_PY_HANDLE_EXCEPTION (except);
|
||||||
|
|
||||||
/* We might not have DW_TAG_template_*, so try to parse the type's
|
/* We might not have DW_TAG_template_*, so try to parse the type's
|
||||||
name. This is inefficient if we do not have a template type --
|
name. This is inefficient if we do not have a template type --
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue