Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Elizabeth Chastain <mec@shout.net>
To: gdb-patches@sources.redhat.com
Subject: [patch] testsuite/gdb.c++/local.exp: accept more nested types
Date: Mon, 27 May 2002 11:07:00 -0000	[thread overview]
Message-ID: <200205271758.g4RHwhY21911@duracef.shout.net> (raw)

This patch updates local.exp to track an improvement in gdb.
In a configuration with gcc HEAD -gstabs+, gdb prints nested types
as "InnerLocal::NestedInnerLocal" instead of just "NestedInnerLocal".
This output is okay.

I tested this on my native i686-pc-linux-gnu test bed
with 6 gcc's, both -gdwarf-2 and -gstabs+.

I'm committing this now.

Michael C

2002-05-27  Michael Chastain  <mec@shout.net>

	* gdb.c++/local.exp: Accept more nested types in output.

Index: gdb.c++/local.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/local.exp,v
retrieving revision 1.8
diff -c -3 -p -r1.8 local.exp
*** gdb.c++/local.exp	23 Apr 2002 05:17:57 -0000	1.8
--- gdb.c++/local.exp	27 May 2002 17:54:30 -0000
*************** gdb_expect {
*** 124,135 ****
  # Pattern 1:
  # PASS
  #   dwarf-2
! #     2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
  #
  # Pattern 2:
  # PASS
  #   stabs+
! #     2.95.3, 2.96-rh, 3.0.4, gcc-3_1-branch, HEAD
  #
  # Pattern 3:
  # Old hppa pattern.
--- 124,135 ----
  # Pattern 1:
  # PASS
  #   dwarf-2
! #     2.95.3, 2.96-rh, 3.0.4, 3.1, gcc-3_1-branch, HEAD
  #
  # Pattern 2:
  # PASS
  #   stabs+
! #     2.95.3, 2.96-rh, 3.0.4, 3.1, gcc-3_1-branch, HEAD
  #
  # Pattern 3:
  # Old hppa pattern.
*************** gdb_expect {
*** 137,148 ****
  # Pattern 4:
  # Old hppa pattern.
  #
! # chastain 2002-04-08
  
  send_gdb "ptype InnerLocal\n"
  gdb_expect {
!   -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*NestedInnerLocal nest1;\[\r\n\t \]*int il_foo\\((unsigned char const|const unsigned char) *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal" }
!   -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*NestedInnerLocal nest1;\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal" }
    -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" }
    -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal4::NestedInnerLocal nest1;\r\n\r\n\[\t \]*int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\\(Local at.*local\.cc:\[0-9\]+\\)\r\n\}.*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" }
    -re ".*$gdb_prompt $"   {  fail "ptype InnerLocal" }
--- 137,148 ----
  # Pattern 4:
  # Old hppa pattern.
  #
! # chastain 2002-05-27
  
  send_gdb "ptype InnerLocal\n"
  gdb_expect {
!   -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*int il_foo\\((unsigned char const|const unsigned char) *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 1)" }
!   -re "type = class InnerLocal \{\[\r\n\t \]*public:\[\r\n\t \]*char ilc;\[\r\n\t \]*int \\* *ip;\[\r\n\t \]*(InnerLocal::|)NestedInnerLocal nest1;\[\r\n\t \]*InnerLocal *& operator *=\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((main${sep}::|)InnerLocal const *&\\);\[\r\n\t \]*InnerLocal\\((void|)\\);\[\r\n\t \]*int il_foo\\(unsigned char const *&\\);\[\r\n\t \]*\}.*$gdb_prompt $" { pass "ptype InnerLocal (pattern 2)" }
    -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*InnerLocal::NestedInnerLocal nest1;\r\n\r\n\[\t \]*.int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\}\[\t \]*\\(Local at.*local\\.cc:36\\).*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" }
    -re "type = class InnerLocal \{\r\n\[\t \]*public:\r\n\[\t \]*char ilc;\r\n\[\t \]*int \\*ip;\r\n\[\t \]*class InnerLocal4::NestedInnerLocal nest1;\r\n\r\n\[\t \]*int il_foo\\(unsigned char const &\\);\r\n\[\t \]*\\(Local at.*local\.cc:\[0-9\]+\\)\r\n\}.*$gdb_prompt $" { pass "ptype InnerLocal (old HP aCC)" }
    -re ".*$gdb_prompt $"   {  fail "ptype InnerLocal" }


             reply	other threads:[~2002-05-27 17:58 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-27 11:07 Michael Elizabeth Chastain [this message]
2002-05-27 11:12 ` Daniel Jacobowitz
2002-05-27 11:38 Michael Elizabeth Chastain
2002-05-27 11:41 ` Daniel Jacobowitz
2002-05-27 13:09 Michael Elizabeth Chastain

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=200205271758.g4RHwhY21911@duracef.shout.net \
    --to=mec@shout.net \
    --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