mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-25 08:47:28 +00:00
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:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user