aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2002-10-17 20:22:58 +0000
committerKevin Buettner <kevinb@redhat.com>2002-10-17 20:22:58 +0000
commitabe1a5d0efb706925b171e04e3b11398c01ad3e0 (patch)
tree3da1958a405d4fb98288a8bfb2a62e4823fbc850 /gdb
parentb5b0480a1015484fb53dabd390031bbdffdc28e1 (diff)
downloadgdb-abe1a5d0efb706925b171e04e3b11398c01ad3e0.zip
gdb-abe1a5d0efb706925b171e04e3b11398c01ad3e0.tar.gz
gdb-abe1a5d0efb706925b171e04e3b11398c01ad3e0.tar.bz2
* gdb.base/constvars.c (struct crass, struct crisp): New structs.
* gdb.base/constvars.exp (ptype crass, ptype crisp): New tests.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/constvars.c5
-rw-r--r--gdb/testsuite/gdb.base/constvars.exp5
3 files changed, 15 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5ca0309..4b5de0d 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2002-10-17 Kevin Buettner <kevinb@redhat.com>
+
+ * gdb.base/constvars.c (struct crass, struct crisp): New structs.
+ * gdb.base/constvars.exp (ptype crass, ptype crisp): New tests.
+
2002-10-02 Jim Blandy <jimb@redhat.com>
* gdb.c++/casts.cc, gdb.c++/casts.exp: New test.
diff --git a/gdb/testsuite/gdb.base/constvars.c b/gdb/testsuite/gdb.base/constvars.c
index b0ce752..1602577 100644
--- a/gdb/testsuite/gdb.base/constvars.c
+++ b/gdb/testsuite/gdb.base/constvars.c
@@ -166,6 +166,11 @@ main (void)
const volatile char * const volatile vagary = &victor;
const volatile unsigned char * const volatile vendor = &vicar;
+
+ /* various structs with const members */
+
+ struct crass { char * const ptr; } crass;
+ struct crisp { char * const *ptr; } crisp;
/* misc. references */
/*
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp
index bb062ef..897a025 100644
--- a/gdb/testsuite/gdb.base/constvars.exp
+++ b/gdb/testsuite/gdb.base/constvars.exp
@@ -278,6 +278,11 @@ proc do_constvar_tests {} {
gdb_test "print *locust" " = 70"
local_compiler_xfail_check
gdb_test "ptype locust" "type = double \\* const"
+
+ local_compiler_xfail_check
+ gdb_test "ptype crass" "type = struct crass \{\[\r\n\]+\[\ \t\]+char \\* const ptr;\[\r\n\]+\}"
+ local_compiler_xfail_check
+ gdb_test "ptype crisp" "type = struct crisp \{\[\r\n\]+\[\ \t\]+char \\* const \\*ptr;\[\r\n\]+\}"
}
do_constvar_tests