From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31792 invoked by alias); 9 Mar 2004 17:33:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31783 invoked from network); 9 Mar 2004 17:33:58 -0000 Received: from unknown (HELO barry.mail.mindspring.net) (207.69.200.25) by sources.redhat.com with SMTP; 9 Mar 2004 17:33:58 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by barry.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1B0l71-0003cZ-00; Tue, 09 Mar 2004 12:33:51 -0500 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 99F1C4B104; Tue, 9 Mar 2004 12:34:01 -0500 (EST) To: carlton@kealia.com, gdb-patches@sources.redhat.com, vinschen@redhat.com Subject: [patch/testsuite/cp] classes.cc: extend scope of obj_with_enum Message-Id: <20040309173401.99F1C4B104@berman.michael-chastain.com> Date: Fri, 19 Mar 2004 00:09:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-03/txt/msg00206.txt.bz2 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 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 ---- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31792 invoked by alias); 9 Mar 2004 17:33:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31783 invoked from network); 9 Mar 2004 17:33:58 -0000 Received: from unknown (HELO barry.mail.mindspring.net) (207.69.200.25) by sources.redhat.com with SMTP; 9 Mar 2004 17:33:58 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by barry.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1B0l71-0003cZ-00; Tue, 09 Mar 2004 12:33:51 -0500 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 99F1C4B104; Tue, 9 Mar 2004 12:34:01 -0500 (EST) To: carlton@kealia.com, gdb-patches@sources.redhat.com, vinschen@redhat.com Subject: [patch/testsuite/cp] classes.cc: extend scope of obj_with_enum Message-ID: <20040309173401.99F1C4B104@berman.michael-chastain.com> Date: Tue, 09 Mar 2004 17:33:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-03.o/txt/msg00206.txt Message-ID: <20040309173300.jFpGiEWSZmr2ILbraHWe21Pd2so32Cd9toR1D7s1FEU@z> 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 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 ----