X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fpython%2Fpy-type.c;h=e202c83732dc9038ca167aebdc0e1793ea004c8f;hb=d4569d7bc572ae8f10d7c527cbdfbc9d26cc1ed8;hp=39376a126f2a5bb23e76bbcfffce5611c04c4e63;hpb=492d29ea1c9a8b2c7d5193908119a4e27c045687;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/python/py-type.c b/gdb/python/py-type.c index 39376a126f..e202c83732 100644 --- a/gdb/python/py-type.c +++ b/gdb/python/py-type.c @@ -346,7 +346,7 @@ typy_fields_items (PyObject *self, enum gdbpy_iter_kind kind) TRY { - CHECK_TYPEDEF (checked_type); + checked_type = check_typedef (checked_type); } CATCH (except, RETURN_MASK_ALL) { @@ -477,7 +477,7 @@ typy_get_composite (struct type *type) { TRY { - CHECK_TYPEDEF (type); + type = check_typedef (type); } CATCH (except, RETURN_MASK_ALL) { @@ -1181,6 +1181,16 @@ typy_nonzero (PyObject *self) return 1; } +/* Return optimized out value of this type. */ + +static PyObject * +typy_optimized_out (PyObject *self, PyObject *args) +{ + struct type *type = ((type_object *) self)->type; + + return value_to_value_object (allocate_optimized_out_value (type)); +} + /* Return a gdb.Field object for the field named by the argument. */ static PyObject * @@ -1493,6 +1503,9 @@ They are first class values." }, { "const", typy_const, METH_NOARGS, "const () -> Type\n\ Return a const variant of this type." }, + { "optimized_out", typy_optimized_out, METH_NOARGS, + "optimized_out() -> Value\n\ +Return optimized out value of this type." }, { "fields", typy_fields, METH_NOARGS, "fields () -> list\n\ Return a list holding all the fields of this type.\n\