diff options
author | Tom Tromey <tromey@redhat.com> | 2008-10-30 21:44:15 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2008-10-30 21:44:15 +0000 |
commit | f3134b888619774c6511acbf8d978bd7427ce1ad (patch) | |
tree | fecd95fd6c571f6a6d6bad373e635a6d9cdb068a /gdb/testsuite | |
parent | 724b958c4168d40f59a35112c36ebf9e02c43d56 (diff) | |
download | gdb-f3134b888619774c6511acbf8d978bd7427ce1ad.zip gdb-f3134b888619774c6511acbf8d978bd7427ce1ad.tar.gz gdb-f3134b888619774c6511acbf8d978bd7427ce1ad.tar.bz2 |
gdb
* value.c (coerce_array): Use check_typedef.
gdb/testsuite
* gdb.base/pointers.exp: Add test.
* gdb.base/pointers.c (k, S): New typedefs.
(instance): New global.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/pointers.c | 9 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/pointers.exp | 4 |
3 files changed, 19 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 9ad4f2d..65966ac 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2008-10-30 Tom Tromey <tromey@redhat.com> + + * gdb.base/pointers.exp: Add test. + * gdb.base/pointers.c (k, S): New typedefs. + (instance): New global. + 2008-10-30 Andreas Schwab <schwab@suse.de> * gdb.base/args.exp: Add tests for newlines. diff --git a/gdb/testsuite/gdb.base/pointers.c b/gdb/testsuite/gdb.base/pointers.c index 85bfdc9..4ee5e78 100644 --- a/gdb/testsuite/gdb.base/pointers.c +++ b/gdb/testsuite/gdb.base/pointers.c @@ -71,6 +71,15 @@ float ** ptr_to_ptr_to_float; int y; + +typedef long k[5]; + +typedef struct { + k array_variable; +} S; + +S instance; + /* Do nothing function used for forcing some of the above variables to be referenced by the program source. If the variables are not referenced, some linkers will remove the symbol from the symbol diff --git a/gdb/testsuite/gdb.base/pointers.exp b/gdb/testsuite/gdb.base/pointers.exp index 5532140..d7d17e7 100644 --- a/gdb/testsuite/gdb.base/pointers.exp +++ b/gdb/testsuite/gdb.base/pointers.exp @@ -596,3 +596,7 @@ gdb_expect { timeout { fail "(timeout) ptype ppppppC" } } +# Regression test for a crash. + +gdb_test "p instance.array_variable + 0" \ + " = \\(long int \\*\\) 0x\[0-9a-f\]*" |