From: Kevin Buettner Date: Thu, 17 Oct 2002 20:22:58 +0000 (+0000) Subject: * gdb.base/constvars.c (struct crass, struct crisp): New structs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=abe1a5d0efb706925b171e04e3b11398c01ad3e0;p=binutils-gdb.git * gdb.base/constvars.c (struct crass, struct crisp): New structs. * gdb.base/constvars.exp (ptype crass, ptype crisp): New tests. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5ca030910ee..4b5de0d4f77 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-10-17 Kevin Buettner + + * 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 * 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 b0ce7529ecb..16025770e35 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 bb062ef5cb9..897a025af0c 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