Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [cplus] An initial use of the canonicalizer
@ 2003-12-30 21:15 Michael Elizabeth Chastain
  2003-12-31  0:59 ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Elizabeth Chastain @ 2003-12-30 21:15 UTC (permalink / raw)
  To: drow, gdb-patches

Uh, I don't like parts of this.

  -   -re "type = (class |)Foo<volatile char ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char.* \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" }
  +   -re "type = (class |)Foo<.*char.* ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char.* \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" }

You dropped the "volatile" from the expected test pattern.
Can you do something like:

  (volatile char ?*|char volatile ?*)

  -    -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" }
  +    -re "\\$\[0-9\]* = \\{.*char.* \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char.* \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" }

This is okay.  The old version is gross with ".*char" so the new version
is no worse.

  +# Verify that we get the same results for Foo for some equivalent
  +# template arguments.
  +gdb_test "ptype Foo<volatile char*>::x" "type = int \\( Foo<.*char.*\\*>::&\\)"
  +gdb_test "ptype Foo<volatile char *>::x" "type = int \\( Foo<.*char.*\\*>::&\\)"
  +gdb_test "ptype Foo<char volatile *>::x" "type = int \\( Foo<.*char.*\\*>::&\\)"

I really want to see "volatile" in there.

  -    -re "ptype Bar\r\ntype = class Bar<int,33> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int bar\\(int, int\\);\r\n}\r\n$gdb_prompt $"
  +    -re "ptype Bar\r\ntype = class Bar<int, 33> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int bar\\(int, int\\);\r\n}\r\n$gdb_prompt $"

Please do this with "<int, ?33>" instead of "<int, 33>".

Here is why: sometimes, I need to run the current test suite with gdb 6.0,
because the 6.0 test suite no longer works with the current compiler.
So it helps me a lot if the current test suite accepts the output
of both gdb 6.0 and gdb HEAD.

Sometimes this is painful but in cases like this it's easy and cheap.

Michael C


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [cplus] An initial use of the canonicalizer
@ 2003-12-31 19:04 Michael Elizabeth Chastain
  2004-01-01  6:03 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Elizabeth Chastain @ 2003-12-31 19:04 UTC (permalink / raw)
  To: drow; +Cc: gdb-patches

drow> It can't be fixed.  I spent a miserable long time last year trying.
drow> There's not enough information to figure out whether the constructor is
drow> explicit or implicit.

Oh, well.  What can't be cured must be endured.

On the bright side, dwarf-1 is almost completely gone from
gcc HEAD (there are just remnants in old 'if' statements).
Maybe stabs+ will go away by 2010.

Michael C


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [cplus] An initial use of the canonicalizer
@ 2003-12-31  4:12 Michael Elizabeth Chastain
  2003-12-31 14:04 ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Elizabeth Chastain @ 2003-12-31  4:12 UTC (permalink / raw)
  To: drow; +Cc: gdb-patches

> So if we're printing <int, 33> somewhere and <int,33> somewhere else,
> that will be a bug.  So I'd write all the tests to match <int, 33> only.
>
> That's the theory I'm going by at the moment at least.

That's a point in favor of accepting only "<int,33>".

However, I'm going to need to check gdb 6.0 against gdb-6_1-branch
eventually.  It will help if I can run some of the same test scripts
from gdb-6_1-branch to check for regressions.  That's why I want
"<int, ?33>", even though it fuzzes the test a little.

So I guess we're in disagreement here.

And man is there a mountain of much worse problems in gdb.cp/*.exp
right now.  I'm checking classes.exp and it's full of stuff like:

  "int i;{$ws};int j;.*\}\n$gdb_prompt$ "

Can you do anything about this:

  (gdb) ptype class whatever
  type = class whatever {
    public:
      int i;
      int j;

    public:
      whatever & operator=(whatever const &);
      whatever(whatever const &);
      whatever();
  }

The implicit functions appear with -gstabs+ and do not appear
with -gdwarf-2.  This causes either a whole lot of extra pattern
lines or a lot of "int j;.*\}".  I have low tolerance for ".*"
in a test pattern!

Michael C


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [cplus] An initial use of the canonicalizer
@ 2003-12-31  2:26 Michael Elizabeth Chastain
  2003-12-31  3:36 ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Elizabeth Chastain @ 2003-12-31  2:26 UTC (permalink / raw)
  To: drow; +Cc: gdb-patches

mec> So there used to be a volatile required, but now there is none.
mec> That's the part I don't like.

drow> That's the part that will be going away when I have more time.  I'm
drow> going to stabilize the output first, and tighten up the testcases one
drow> test at a time second; too many changes, otherwise.

Yes, I'm sorry -- I shouldn't jump on your back about this.
(I'm having a bad day with gdb.cp already).

drow> So you're OK if I make these tests fail when run against GDB 6.0?
drow> I'm a little confused by your response.

I'm okay with the idea of accepting only "char volatile*",
or whichever flavor you land on.  When I run that test script against
gdb 6.0, it will FAIL with gdb 6.0 and PASS with gdb HEAD.
I can handle that.

To look at it another way, I'm okay whenever the test suite gets
more stringent and stuff that used to PASS (but shouldn't)
now FAILs.  And other people won't notice a problem as long as
gdb is fixed before the test suite is improved.

A question about the "<int,33>" versus "<int, 33>".
Is "<int,33>" a bug?  I don't consider it a bug, so it would bother me
if that started FAILing.  That's why I want the pattern to be
"<int, ?33>".

Michael C


^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: [cplus] An initial use of the canonicalizer
@ 2003-12-31  1:43 Michael Elizabeth Chastain
  2003-12-31  2:09 ` Daniel Jacobowitz
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Elizabeth Chastain @ 2003-12-31  1:43 UTC (permalink / raw)
  To: drow; +Cc: gdb-patches

> That's why I'm not submitting it for mainline yet.  Sorry if I wasn't
> clear.  The [cplus] tag means it's going on my branch.

Oh, I know.  I'd like to express my concern sooner rather than later.

> For now I'm just kludging around things so that I can see when I
> introduce regressions on my branch.

That part is fine.

> Let's talk about the problem.  Which is more important - checking GDB
> 6.0 against GCC HEAD, or being able to verify that I've successfully
> canonicalized _all_ of GDB's output patterns?

I would actually pick the former, checking gdb 6.0 versus gcc HEAD.
Here's why.

To me, the most important property of a gdb release is that it doesn't
introduce regressions versus the previous gdb release.  I want
*everyone* with gdb 6.0 to be able to upgrade to gdb 6.1 (except for
explicitly deprecated things).

It's tough for me to find these regressions because the test suite has a
lot of noise (300 non-PASS results that we routinely ignore) and bugs
often manifest in very subtle ways.

So it helps a lot if the same test suite works with gdb 6.0 and gdb HEAD.
Then I have to spend less time grubbing in gdb.log files.

> I'd like to consider "volatile char *" a bug when we're expecting to
> see "char volatile*", not accept both.

That would be great with me.  Then I would see "gdb 6.0 FAIL,
gdb HEAD PASS".  But what you did was change:

  - volatile char ?\\*
  + .*char.* ?\\*

So there used to be a volatile required, but now there is none.
That's the part I don't like.

Michael C


^ permalink raw reply	[flat|nested] 12+ messages in thread
* [cplus] An initial use of the canonicalizer
@ 2003-12-30 21:03 Daniel Jacobowitz
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel Jacobowitz @ 2003-12-30 21:03 UTC (permalink / raw)
  To: gdb-patches

One of the historical warts I've wanted to correct: the compiler formats
template-ids differently in DW_AT_name than the demangler does in the symbol
table.  So we get debug info for Foo<volatile char *>::foo and an
implementation for Foo<char volatile *>::foo.  This is a first step towards
knowing that they're the same.

Next I'm taking a detour through the type-printer.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

2003-12-30  Daniel Jacobowitz  <drow@mvista.com>

	* gdb.cp/templates.exp: Formatting changes to match demangler style
	for template names.  New tests for member variable Foo::x with
	different spellings of the template argument.

2003-12-30  Daniel Jacobowitz  <drow@mvista.com>

	* cp-names.y (yylex): Fix thinko for character constants.
	* dwarf2read.c: Include "cp-names.h".
	(read_structure_scope): Canonicalize class names.

Index: cp-names.y
===================================================================
RCS file: /cvs/src/src/gdb/Attic/cp-names.y,v
retrieving revision 1.1.2.14
diff -u -p -r1.1.2.14 cp-names.y
--- cp-names.y	24 Dec 2003 22:35:25 -0000	1.1.2.14
+++ cp-names.y	30 Dec 2003 20:54:07 -0000
@@ -1597,12 +1597,17 @@ yylex (void)
                  "character set `%s'.", tok, target_charset ());
         }
 
-      yylval.typed_val_int.val = c;
-      yylval.typed_val_int.type = d_builtin_type ('c' - 'a');
-
       c = *lexptr++;
       if (c != '\'')
 	error ("Invalid character constant.");
+
+      /* FIXME: We should refer to a canonical form of the character,
+	 presumably the same one that appears in manglings - the decimal
+	 representation.  But if that isn't in our input then we have to
+	 allocate memory for it somewhere.  */
+      yylval.comp = d_make_comp (di, D_COMP_LITERAL,
+				 d_builtin_type ('c' - 'a'),
+				 d_make_name (di, tokstart, lexptr - tokstart));
 
       return INT;
 
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.67.2.4
diff -u -p -r1.67.2.4 dwarf2read.c
--- dwarf2read.c	14 Dec 2003 20:27:11 -0000	1.67.2.4
+++ dwarf2read.c	30 Dec 2003 20:54:08 -0000
@@ -44,6 +44,7 @@
 #include "dwarf2expr.h"
 #include "dwarf2loc.h"
 #include "cp-support.h"
+#include "cp-names.h"
 
 #include <fcntl.h>
 #include "gdb_string.h"
@@ -2779,9 +2780,15 @@ read_structure_scope (struct die_info *d
   attr = dwarf_attr (die, DW_AT_name);
   if (attr && DW_STRING (attr))
     {
-      TYPE_TAG_NAME (type) = obsavestring (DW_STRING (attr),
-					   strlen (DW_STRING (attr)),
+      /* FIXME: This should be in a more general location.  */
+      char *name;
+      name = cp_canonicalize_string (DW_STRING (attr));
+      if (name == NULL)
+	name = DW_STRING (attr);
+      TYPE_TAG_NAME (type) = obsavestring (name, strlen (name),
 					   &objfile->type_obstack);
+      if (name != DW_STRING (attr))
+	free (name);
     }
 
   if (die->tag == DW_TAG_structure_type)
Index: testsuite/gdb.cp/templates.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/templates.exp,v
retrieving revision 1.2.2.2
diff -u -p -r1.2.2.2 templates.exp
--- testsuite/gdb.cp/templates.exp	15 Dec 2003 02:11:47 -0000	1.2.2.2
+++ testsuite/gdb.cp/templates.exp	30 Dec 2003 20:54:09 -0000
@@ -311,7 +311,7 @@ gdb_expect {   
 
 send_gdb "ptype fvpchar\n"   
 gdb_expect {   
-   -re "type = (class |)Foo<volatile char ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char.* \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" }
+   -re "type = (class |)Foo<.*char.* ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*.*char.*\\*t;\r\n\r\n\[ \t\]*.*char.* \\* foo\\(int,.*char.*\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype fvpchar" }
    -re "$gdb_prompt $"                     { fail "ptype fvpchar" }
    timeout                             { fail "(timeout) ptype fvpchar" }
 }
@@ -323,7 +323,7 @@ gdb_expect {   
 
 send_gdb "print Foo<volatile char *>::foo\n"   
 gdb_expect {   
-    -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" }
+    -re "\\$\[0-9\]* = \\{.*char.* \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char.* \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char *>::foo" }
     -re "No symbol \"Foo<volatile char \\*>\" in current context.\r\n$gdb_prompt $"
     {
 	# This used to be a kfail gdb/33, but it shouldn't occur any more now.
@@ -335,7 +335,7 @@ gdb_expect {   
 
 send_gdb "print Foo<volatile char*>::foo\n"   
 gdb_expect {   
-    -re "\\$\[0-9\]* = \\{.*char \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char*>::foo" }
+    -re "\\$\[0-9\]* = \\{.*char.* \\*\\((class |)Foo<volatile char ?\\*> \\*(| const), int, .*char.* \\*\\)\\} $hex <Foo<.*char.*\\*>::foo\\(int, .*char.*\\*\\)>\r\n$gdb_prompt $" { pass "print Foo<volatile char*>::foo" }
     -re "No symbol \"Foo<volatile char\\*>\" in current context.\r\n$gdb_prompt $"
     {
 	# This used to be a kfail gdb/33, but it shouldn't occur any more now.
@@ -345,6 +345,12 @@ gdb_expect {   
     timeout                             { fail "(timeout) print Foo<volatile char*>::foo" }
 }
 
+# Verify that we get the same results for Foo for some equivalent
+# template arguments.
+gdb_test "ptype Foo<volatile char*>::x" "type = int \\( Foo<.*char.*\\*>::&\\)"
+gdb_test "ptype Foo<volatile char *>::x" "type = int \\( Foo<.*char.*\\*>::&\\)"
+gdb_test "ptype Foo<char volatile *>::x" "type = int \\( Foo<.*char.*\\*>::&\\)"
+
 # Template Bar<T, int>
 
 # same as Foo for g++
@@ -352,7 +358,7 @@ send_gdb "ptype Bar\n"   
 gdb_expect {   
     -re "type = template <(class |)T, (class |)sz> (class |)Bar \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Bar<int,(\\(int\\)|)1>\r\n\[ \t\]*(class |)Bar<int,(\\(int\\)|)33>\r\n$gdb_prompt $" { pass "ptype Bar" }
     -re "type = <(class |)T, (class |)sz> (class |)Bar \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Bar" }
-    -re "ptype Bar\r\ntype = class Bar<int,33> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int bar\\(int, int\\);\r\n}\r\n$gdb_prompt $"
+    -re "ptype Bar\r\ntype = class Bar<int, 33> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int bar\\(int, int\\);\r\n}\r\n$gdb_prompt $"
     { # GCC 3.1, DWARF-2 output.
 	kfail "gdb/57" "ptype Bar" }
     -re "No symbol \"Bar\" in current context.\r\n$gdb_prompt $"
@@ -367,7 +373,7 @@ gdb_expect {   
 
 send_gdb "ptype bint\n"   
 gdb_expect {   
-   -re "type = (class |)Bar<int,(\\(int\\)|)33> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int bar\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint" }
+   -re "type = (class |)Bar<int, (\\(int\\)|)33> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int bar\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint" }
    -re "$gdb_prompt $"                     { fail "ptype bint" }
    timeout                             { fail "(timeout) ptype bint" }
 }
@@ -376,7 +382,7 @@ gdb_expect {   
 
 send_gdb "ptype bint2\n"   
 gdb_expect {   
-   -re "type = (class |)Bar<int,(\\(int\\)|)1> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int bar\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint2" }
+   -re "type = (class |)Bar<int, (\\(int\\)|)1> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int bar\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bint2" }
    -re "$gdb_prompt $"                     { fail "ptype bint2" }
    timeout                             { fail "(timeout) ptype bint2" }
 }
@@ -388,7 +394,7 @@ send_gdb "ptype Baz\n"   
 gdb_expect {   
     -re "type = template <(class |)T, (class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Baz<char,(\\(char\\)|)97>\r\n\[ \t\]*(class |)Baz<int,(\\(char\\)|)115>\r\n$gdb_prompt $" { pass "ptype Baz" }
     -re "type = <(class |)T, (class |)sz> (class |)Baz \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Baz" }
-    -re "type = class Baz<int,'s'> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int baz\\(int, int\\);\r\n}\r\n$gdb_prompt $"
+    -re "type = class Baz<int, 's'> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*int baz\\(int, int\\);\r\n}\r\n$gdb_prompt $"
     { # GCC 3.1, DWARF-2 output.
 	kfail "gdb/57" "ptype Baz" }
     -re "No symbol \"Baz\" in current context.\r\n$gdb_prompt $"
@@ -403,7 +409,7 @@ gdb_expect {   
 
 send_gdb "ptype bazint\n"   
 gdb_expect {   
-   -re "type = (class |)Baz<int,(\\(char\\)|)(115|\\'s\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int baz\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint" }
+   -re "type = (class |)Baz<int, (\\(char\\)|)(115|\\'s\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int baz\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint" }
    -re "$gdb_prompt $"                     { fail "ptype bazint" }
    timeout                             { fail "(timeout) ptype bazint" }
 }
@@ -412,7 +418,7 @@ gdb_expect {   
 
 send_gdb "ptype bazint2\n"   
 gdb_expect {   
-   -re "type = (class |)Baz<char,(\\(char\\)|)(97|\\'a\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*.*char baz\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint2" }
+   -re "type = (class |)Baz<char, (\\(char\\)|)(97|\\'a\\')> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*.*char baz\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype bazint2" }
    -re "$gdb_prompt $"                     { fail "ptype bazint2" }
    timeout                             { fail "(timeout) ptype bazint2" }
 }
@@ -423,7 +429,7 @@ send_gdb "ptype Qux\n"   
 gdb_expect {   
     -re "type = template <(class |)T, (class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Qux<int,&string>\r\n\[ \t\]*(class |)Qux<char,&string>\r\n$gdb_prompt $" { pass "ptype Qux" }
     -re ".*type = template <(class |)T.*, (class |)sz> (class |)Qux \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*T t;\r\n\\}.*$gdb_prompt $" { pass "ptype Qux" }
-    -re "type = class Qux<char,&string> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char qux\\(int, char\\);\r\n}\r\n$gdb_prompt $"
+    -re "type = class Qux<char, &\\(string\\)> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char qux\\(int, char\\);\r\n}\r\n$gdb_prompt $"
     { # GCC 3.1, DWARF-2 output.
 	kfail "gdb/57" "ptype Qux" }
     -re "No symbol \"Qux\" in current context.\r\n$gdb_prompt $"
@@ -437,7 +443,7 @@ gdb_expect {   
 
 send_gdb "ptype quxint\n"   
 gdb_expect {   
-   -re "type = class Qux<int,&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
+   -re "type = class Qux<int, &\\(string\\)> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*int t;\r\n\r\n\[ \t\]*.*int qux\\(int, int\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint" }
    -re "$gdb_prompt $"                     { fail "ptype quxint" }
    timeout                             { fail "(timeout) ptype quxint" }
 }
@@ -448,7 +454,7 @@ gdb_expect {   
 # templates.exp -- ovidiu
 # send_gdb "ptype quxint2\n"   
 # gdb_expect {   
-#    -re "type = class Qux<char,&string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char qux\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint2" }
+#    -re "type = class Qux<char, &string> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\[ \t\]*char t;\r\n\r\n\[ \t\]*char qux\\(int, char\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype quxint2" }
 #    -re "$gdb_prompt $"                     { fail "ptype quxint2" }
 #    timeout                             { fail "(timeout) ptype quxint2" }
 # }
@@ -460,7 +466,7 @@ send_gdb "ptype Spec\n"   
 gdb_expect {   
     -re "type = template <(class |)T1, (class |)T2> (class |)Spec \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\\}\r\ntemplate instantiations:\r\n\[ \t\]*(class |)Spec<int,int \\*>\r\n\[ \t\]*(class |)Spec<int,char>\r\n$gdb_prompt $" { pass "ptype Spec" }
     -re "type = <(class |)T1, (class |)T2> (class |)Spec \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\\}\r\n$gdb_prompt $" { xfail "ptype Spec" }
-    -re "type = class Spec<int,char> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*int spec\\(char\\);\r\n}\r\n$gdb_prompt $"
+    -re "type = class Spec<int, char> {\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*int spec\\(char\\);\r\n}\r\n$gdb_prompt $"
     { # GCC 3.1, DWARF-2 output.
 	kfail "gdb/57" "ptype Spec" }
     -re "No symbol \"Spec\" in current context.\r\n$gdb_prompt $"
@@ -474,7 +480,7 @@ gdb_expect {   
 
 send_gdb "ptype siip\n"   
 gdb_expect {   
-   -re "type = class Spec<int,int ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*.*int spec\\(int ?\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype siip" }
+   -re "type = class Spec<int, int ?\\*> \\{\r\n\[ \t\]*public:\r\n\[ \t\]*int x;\r\n\r\n\[ \t\]*.*int spec\\(int ?\\*\\);\r\n\\}\r\n$gdb_prompt $" { pass "ptype siip" }
    -re "$gdb_prompt $"                     { fail "ptype siip" }
    timeout                             { fail "(timeout) ptype siip" }
 }


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2004-01-01  7:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-30 21:15 [cplus] An initial use of the canonicalizer Michael Elizabeth Chastain
2003-12-31  0:59 ` Daniel Jacobowitz
  -- strict thread matches above, loose matches on Subject: below --
2003-12-31 19:04 Michael Elizabeth Chastain
2004-01-01  6:03 ` Eli Zaretskii
2004-01-01  7:50   ` Daniel Jacobowitz
2003-12-31  4:12 Michael Elizabeth Chastain
2003-12-31 14:04 ` Daniel Jacobowitz
2003-12-31  2:26 Michael Elizabeth Chastain
2003-12-31  3:36 ` Daniel Jacobowitz
2003-12-31  1:43 Michael Elizabeth Chastain
2003-12-31  2:09 ` Daniel Jacobowitz
2003-12-30 21:03 Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox