From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21514 invoked by alias); 12 Mar 2010 20:05:22 -0000 Received: (qmail 21501 invoked by uid 22791); 12 Mar 2010 20:05:20 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,RCVD_IN_DNSWL_HI,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Mar 2010 20:05:15 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2CK5D27016468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 12 Mar 2010 15:05:14 -0500 Received: from [10.15.16.55] (toner.yyz.redhat.com [10.15.16.55]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2CK5DB0012378 for ; Fri, 12 Mar 2010 15:05:13 -0500 Message-ID: <4B9A9DB7.7060202@redhat.com> Date: Fri, 12 Mar 2010 20:05:00 -0000 From: Sami Wagiaalla User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Lightning/1.0b1 Thunderbird/3.0.1 MIME-Version: 1.0 To: GDB Patches Subject: [patch] Reset 'using_directives' after block initialization Content-Type: multipart/mixed; boundary="------------090309020002080009010000" X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-03/txt/msg00475.txt.bz2 This is a multi-part message in MIME format. --------------090309020002080009010000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1962 The global pointer using_directives is used to temporarily store the using_direct linked list until it is used to set the current blocks using directives. The pointer must be reset to NULL every time after block initialization. This patch fixes that. 2010-03-12 Sami Wagiaalla * buildsym.c (finish_block): Reset using_directives pointer after block initialization. 2010-03-12 Sami Wagiaalla * gdb.cp/gdb2384-base.h: Created 'namespace B'. * gdb.cp/gdb2384-base.cc: Use 'namespace B'. Index: gdb/buildsym.c =================================================================== RCS file: /cvs/src/src/gdb/buildsym.c,v retrieving revision 1.78 diff -u -r1.78 buildsym.c --- gdb/buildsym.c 1 Jan 2010 07:31:30 -0000 1.78 +++ gdb/buildsym.c 12 Mar 2010 16:45:37 -0000 @@ -387,6 +387,7 @@ } block_set_using (block, using_directives, &objfile->objfile_obstack); + using_directives = NULL; record_pending_block (objfile, block, opblock); Index: gdb/testsuite/gdb.cp/gdb2384-base.cc =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/gdb2384-base.cc,v retrieving revision 1.5 diff -u -r1.5 gdb2384-base.cc --- gdb/testsuite/gdb.cp/gdb2384-base.cc 1 Jan 2010 07:32:01 -0000 1.5 +++ gdb/testsuite/gdb.cp/gdb2384-base.cc 12 Mar 2010 16:45:38 -0000 @@ -23,6 +23,8 @@ { } +using namespace B; + int base::meth () { Index: gdb/testsuite/gdb.cp/gdb2384-base.h =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/gdb2384-base.h,v retrieving revision 1.5 diff -u -r1.5 gdb2384-base.h --- gdb/testsuite/gdb.cp/gdb2384-base.h 1 Jan 2010 07:32:01 -0000 1.5 +++ gdb/testsuite/gdb.cp/gdb2384-base.h 12 Mar 2010 16:45:38 -0000 @@ -16,6 +16,10 @@ along with this program. If not, see . */ +namespace B{ + int x; +} + class base { public: --------------090309020002080009010000 Content-Type: text/plain; name="using_directive.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="using_directive.patch" Content-length: 1708 2010-03-12 Sami Wagiaalla * buildsym.c (finish_block): Reset using_directives pointer after block initialization. 2010-03-12 Sami Wagiaalla * gdb.cp/gdb2384-base.h: Created 'namespace B'. * gdb.cp/gdb2384-base.cc: Use 'namespace B'. Index: gdb/buildsym.c =================================================================== RCS file: /cvs/src/src/gdb/buildsym.c,v retrieving revision 1.78 diff -u -r1.78 buildsym.c --- gdb/buildsym.c 1 Jan 2010 07:31:30 -0000 1.78 +++ gdb/buildsym.c 12 Mar 2010 16:45:37 -0000 @@ -387,6 +387,7 @@ } block_set_using (block, using_directives, &objfile->objfile_obstack); + using_directives = NULL; record_pending_block (objfile, block, opblock); Index: gdb/testsuite/gdb.cp/gdb2384-base.cc =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/gdb2384-base.cc,v retrieving revision 1.5 diff -u -r1.5 gdb2384-base.cc --- gdb/testsuite/gdb.cp/gdb2384-base.cc 1 Jan 2010 07:32:01 -0000 1.5 +++ gdb/testsuite/gdb.cp/gdb2384-base.cc 12 Mar 2010 16:45:38 -0000 @@ -23,6 +23,8 @@ { } +using namespace B; + int base::meth () { Index: gdb/testsuite/gdb.cp/gdb2384-base.h =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/gdb2384-base.h,v retrieving revision 1.5 diff -u -r1.5 gdb2384-base.h --- gdb/testsuite/gdb.cp/gdb2384-base.h 1 Jan 2010 07:32:01 -0000 1.5 +++ gdb/testsuite/gdb.cp/gdb2384-base.h 12 Mar 2010 16:45:38 -0000 @@ -16,6 +16,10 @@ along with this program. If not, see . */ +namespace B{ + int x; +} + class base { public: --------------090309020002080009010000--