gdb
2010-08-30 Andre Poenitz <andre.poenitz@nokia.com> Tom Tromey <tromey@redhat.com> PR python/11792: * python/py-value.c (valpy_get_dynamic_type): New function. (value_object_getset): Add "dynamic_type". (valpy_get_type): Fail on error. gdb/doc PR python/11792: * gdb.texinfo (Values From Inferior): Document dynamic_type. gdb/testsuite PR python/11792: * gdb.python/py-value.exp (test_subscript_regression): Add dynamic_type test.
This commit is contained in:
parent
640617ad17
commit
03f17ccfe1
6 changed files with 111 additions and 4 deletions
|
@ -379,6 +379,13 @@ proc test_subscript_regression {lang} {
|
|||
# the C++ tests.
|
||||
gdb_test "python print bool(gdb.parse_and_eval('base').dynamic_cast(gdb.lookup_type('Derived').pointer()))" \
|
||||
True
|
||||
|
||||
# Likewise.
|
||||
gdb_test "python print gdb.parse_and_eval('base').dynamic_type" \
|
||||
"Derived \[*\]"
|
||||
# A static type case.
|
||||
gdb_test "python print gdb.parse_and_eval('5').dynamic_type" \
|
||||
"int"
|
||||
}
|
||||
|
||||
gdb_breakpoint [gdb_get_line_number "break to inspect struct and union"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue