Add gdb.Type.optimized_out method.

gdb/ChangeLog:

	* NEWS: Mention gdb.Type.optimized_out method.
	* python/py-type.c (typy_optimized_out):  New function.

gdb/doc/ChangeLog:

	* python.texi: New method documented.

gdb/testsuite/ChangeLog:

	* gdb.python/py-type.exp: New test.
This commit is contained in:
Sasha Smundak
2015-04-28 17:41:09 -07:00
committed by Doug Evans
parent 521f2feb98
commit 59fb7612dd
7 changed files with 36 additions and 0 deletions

View File

@ -253,6 +253,9 @@ gdb_test "python print(gdb.lookup_type('char').array(1, 0))" \
gdb_test "python print(gdb.lookup_type('char').array(1, -1))" \
"Array length must not be negative.*"
gdb_test "python print(gdb.lookup_type('int').optimized_out())" \
"<optimized out>"
with_test_prefix "lang_c" {
runto_bp "break to inspect struct and array."
test_fields "c"