From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 436 invoked by alias); 21 Apr 2010 17:35:29 -0000 Received: (qmail 32754 invoked by uid 22791); 21 Apr 2010 17:35:26 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Wed, 21 Apr 2010 17:35:17 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3LHZFrA019178 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 21 Apr 2010 13:35:15 -0400 Received: from qcore.mollernet.net (vpn-10-93.rdu.redhat.com [10.11.10.93]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3LHZEiC006714; Wed, 21 Apr 2010 13:35:15 -0400 Message-ID: <4BCF3752.20103@redhat.com> Date: Wed, 21 Apr 2010 17:35:00 -0000 From: Chris Moller User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Thunderbird/3.0b2 MIME-Version: 1.0 To: tromey@redhat.com CC: gdb-patches@sourceware.org Subject: Re: PR9167 Derived class static member CRTP infinite recursion on print References: <4BC7DDFC.3050506@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-04/txt/msg00692.txt.bz2 Fixed up and committed. On 04/20/10 14:46, Tom Tromey wrote: >>>>>> "Chris" == Chris Moller writes: >>>>>> > > Chris> You can't do that. obstack_base() returns a pointer to the current > Chris> allocation, which may change depending on what's stuffed into the > Chris> obstack--by the time the obstack_free is hit, the base may have > Chris> changed. > > Why do we need to pop the stack at all? > It seems to me that if we printed something once, during a given call > into val_print, then we should never try to print it again. > Am I missing something? > > Chris> + void * free_to_ptr = > > No space after the "*". > > Chris> obstack_grow (&dont_print_statmem_obstack, (char *)&addr, > Chris> sizeof (CORE_ADDR)); > Chris> - > Chris> CHECK_TYPEDEF (type); > > Gratuitious whitespace change. > > This is ok with those changes. Thanks. > > Tom >