diff options
author | Tom Tromey <tromey@redhat.com> | 2010-08-23 20:21:28 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2010-08-23 20:21:28 +0000 |
commit | 702c27113693b383728d0b423f58389544a80614 (patch) | |
tree | 4eb3528024efcf2a3e34cd0f8b567bc9fde6e456 /gdb/testsuite/gdb.python/py-type.exp | |
parent | 832bafd3314b6f1fb7f7c0e7abe596b11e6364ba (diff) | |
download | fsf-binutils-gdb-702c27113693b383728d0b423f58389544a80614.zip fsf-binutils-gdb-702c27113693b383728d0b423f58389544a80614.tar.gz fsf-binutils-gdb-702c27113693b383728d0b423f58389544a80614.tar.bz2 |
gdb
PR python/11915:
* python/py-type.c (typy_array): New function.
(type_object_methods): Add "array".
gdb/doc
PR python/11915:
* gdb.texinfo (Types In Python): Document array method.
gdb/testsuite
PR python/11915:
* gdb.python/py-type.exp (test_fields): Add tests for array.
Diffstat (limited to 'gdb/testsuite/gdb.python/py-type.exp')
-rw-r--r-- | gdb/testsuite/gdb.python/py-type.exp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-type.exp b/gdb/testsuite/gdb.python/py-type.exp index 6e5bd0e..095711f 100644 --- a/gdb/testsuite/gdb.python/py-type.exp +++ b/gdb/testsuite/gdb.python/py-type.exp @@ -97,6 +97,11 @@ proc test_fields {lang} { gdb_test "python fields = ar.type.fields()" gdb_test "python print len(fields)" "1" "Check the number of fields" gdb_test "python print fields\[0\].type" "<range type>" "Check array field type" + + gdb_test "python print ar\[0\].cast(ar\[0\].type.array(1))" \ + ".1, 2." "cast to array with one argument" + gdb_test "python print ar\[0\].cast(ar\[0\].type.array(0, 1))" \ + ".1, 2." "cast to array with two arguments" } proc test_base_class {} { |