diff options
author | Tom Tromey <tromey@redhat.com> | 2010-08-30 20:28:31 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-08-30 20:28:31 +0000 |
commit | 03f17ccfe196bd03d370b5c0d9983b8d8eed12d7 (patch) | |
tree | 56c6e9dbfdf091fd6ac9aca69cc9a4914ee50c1c /gdb/testsuite/gdb.python | |
parent | 640617ad17a526e78796054d1da3d652ae5c8dc9 (diff) | |
download | gdb-03f17ccfe196bd03d370b5c0d9983b8d8eed12d7.zip gdb-03f17ccfe196bd03d370b5c0d9983b8d8eed12d7.tar.gz gdb-03f17ccfe196bd03d370b5c0d9983b8d8eed12d7.tar.bz2 |
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.
Diffstat (limited to 'gdb/testsuite/gdb.python')
-rw-r--r-- | gdb/testsuite/gdb.python/py-value.exp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp index 13bce9a..0ecb57c 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp @@ -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"] |