Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: carlton@kealia.com, gdb-patches@sources.redhat.com, vinschen@redhat.com
Subject: [patch/testsuite/cp] classes.cc: extend scope of obj_with_enum
Date: Fri, 19 Mar 2004 00:09:00 -0000	[thread overview]
Message-ID: <20040309173401.99F1C4B104@berman.michael-chastain.com> (raw)

This patch fixes the problem reported by Corinna V in classes.exp.
I started with Corinna's patch and used Daniel J's suggestion to
hit a different member rather than writing on the same member twice.
This also lets me get rid of a TODO in classes.exp.

Tested on: native i686-pc-linux-gnu, gcc 2.95.3 3.3.3 HEAD, dwarf-2
and stabs+.  With gcc HEAD -gdwarf-2, these results improved:

  -FAIL: gdb.cp/classes.exp: print obj_with_enum (2)
  -FAIL: gdb.cp/classes.exp: print obj_with_enum.priv_enum
  -FAIL: gdb.cp/classes.exp: ptype obj_with_enum.priv_enum
  -FAIL: gdb.cp/classes.exp: ptype obj_with_enum
  +PASS: gdb.cp/classes.exp: print obj_with_enum (2)
  +PASS: gdb.cp/classes.exp: print obj_with_enum.priv_enum
  +PASS: gdb.cp/classes.exp: ptype obj_with_enum.priv_enum
  +KFAIL: gdb.cp/classes.exp: ptype obj_with_enum (PRMS: gdb/57)

I am committing this now.  Thanks Corinna!  And let me know if it
doesn't work for you.

2004-03-09  Michael Chastain  <mec.gnu@mindspring.com>

	From Corinna Vinschen with modifications.
	* gdb.cp/classes.cc (enums1): Add a line to extend scope of
	local variable obj_with_enum.
	* gdb.cp/classes.exp (test_enums): Remove TODO note about FAIL
	results with obj_with_enum.

Michael C

Index: classes.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/classes.cc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 classes.cc
*** classes.cc	9 Mar 2004 17:11:55 -0000	1.1
--- classes.cc	9 Mar 2004 17:25:23 -0000
***************
*** 1,6 ****
  /* This testcase is part of GDB, the GNU debugger.
  
!    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
--- 1,6 ----
  /* This testcase is part of GDB, the GNU debugger.
  
!    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2004
     Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
*************** void enums1 ()
*** 453,458 ****
--- 453,459 ----
    obj_with_enum.x = 0;
    enums2 ();
    obj_with_enum.priv_enum = ClassWithEnum::green;
+   obj_with_enum.x = 1;
  }
  
  class ClassParam {
Index: classes.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/classes.exp,v
retrieving revision 1.8
diff -c -3 -p -r1.8 classes.exp
*** classes.exp	9 Mar 2004 17:11:55 -0000	1.8
--- classes.exp	9 Mar 2004 17:25:23 -0000
*************** proc test_enums {} {
*** 633,643 ****
  
      gdb_test "next" ""
  
-     # TODO: with gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2,
-     # gdb says that obj_with_enum is out of scope here and the
-     # tests after this FAIL.  This needs investigation.
-     # -- chastain 2003-12-30
- 
      # print the object again
  
      gdb_test "print obj_with_enum" \
--- 633,638 ----


WARNING: multiple messages have this Message-ID
From: mec.gnu@mindspring.com (Michael Elizabeth Chastain)
To: carlton@kealia.com, gdb-patches@sources.redhat.com, vinschen@redhat.com
Subject: [patch/testsuite/cp] classes.cc: extend scope of obj_with_enum
Date: Tue, 09 Mar 2004 17:33:00 -0000	[thread overview]
Message-ID: <20040309173401.99F1C4B104@berman.michael-chastain.com> (raw)
Message-ID: <20040309173300.jFpGiEWSZmr2ILbraHWe21Pd2so32Cd9toR1D7s1FEU@z> (raw)

This patch fixes the problem reported by Corinna V in classes.exp.
I started with Corinna's patch and used Daniel J's suggestion to
hit a different member rather than writing on the same member twice.
This also lets me get rid of a TODO in classes.exp.

Tested on: native i686-pc-linux-gnu, gcc 2.95.3 3.3.3 HEAD, dwarf-2
and stabs+.  With gcc HEAD -gdwarf-2, these results improved:

  -FAIL: gdb.cp/classes.exp: print obj_with_enum (2)
  -FAIL: gdb.cp/classes.exp: print obj_with_enum.priv_enum
  -FAIL: gdb.cp/classes.exp: ptype obj_with_enum.priv_enum
  -FAIL: gdb.cp/classes.exp: ptype obj_with_enum
  +PASS: gdb.cp/classes.exp: print obj_with_enum (2)
  +PASS: gdb.cp/classes.exp: print obj_with_enum.priv_enum
  +PASS: gdb.cp/classes.exp: ptype obj_with_enum.priv_enum
  +KFAIL: gdb.cp/classes.exp: ptype obj_with_enum (PRMS: gdb/57)

I am committing this now.  Thanks Corinna!  And let me know if it
doesn't work for you.

2004-03-09  Michael Chastain  <mec.gnu@mindspring.com>

	From Corinna Vinschen with modifications.
	* gdb.cp/classes.cc (enums1): Add a line to extend scope of
	local variable obj_with_enum.
	* gdb.cp/classes.exp (test_enums): Remove TODO note about FAIL
	results with obj_with_enum.

Michael C

Index: classes.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/classes.cc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 classes.cc
*** classes.cc	9 Mar 2004 17:11:55 -0000	1.1
--- classes.cc	9 Mar 2004 17:25:23 -0000
***************
*** 1,6 ****
  /* This testcase is part of GDB, the GNU debugger.
  
!    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
--- 1,6 ----
  /* This testcase is part of GDB, the GNU debugger.
  
!    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2004
     Free Software Foundation, Inc.
  
     This program is free software; you can redistribute it and/or modify
*************** void enums1 ()
*** 453,458 ****
--- 453,459 ----
    obj_with_enum.x = 0;
    enums2 ();
    obj_with_enum.priv_enum = ClassWithEnum::green;
+   obj_with_enum.x = 1;
  }
  
  class ClassParam {
Index: classes.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/classes.exp,v
retrieving revision 1.8
diff -c -3 -p -r1.8 classes.exp
*** classes.exp	9 Mar 2004 17:11:55 -0000	1.8
--- classes.exp	9 Mar 2004 17:25:23 -0000
*************** proc test_enums {} {
*** 633,643 ****
  
      gdb_test "next" ""
  
-     # TODO: with gcc HEAD 2003-12-28 21:08:30 UTC -gdwarf-2,
-     # gdb says that obj_with_enum is out of scope here and the
-     # tests after this FAIL.  This needs investigation.
-     # -- chastain 2003-12-30
- 
      # print the object again
  
      gdb_test "print obj_with_enum" \
--- 633,638 ----


             reply	other threads:[~2004-03-09 17:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19  0:09 Michael Elizabeth Chastain [this message]
2004-03-09 17:33 ` 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=20040309173401.99F1C4B104@berman.michael-chastain.com \
    --to=mec.gnu@mindspring.com \
    --cc=carlton@kealia.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vinschen@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