Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: drow@mvista.com, gdb-patches@sources.redhat.com
Subject: Re: [cplus] An initial use of the canonicalizer
Date: Tue, 30 Dec 2003 21:15:00 -0000	[thread overview]
Message-ID: <20031230211502.E56374B35A@berman.michael-chastain.com> (raw)

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


             reply	other threads:[~2003-12-30 21:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-30 21:15 Michael Elizabeth Chastain [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031230211502.E56374B35A@berman.michael-chastain.com \
    --to=mec.gnu@mindspring.com \
    --cc=drow@mvista.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox