From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31355 invoked by alias); 20 Apr 2010 20:24:18 -0000 Received: (qmail 31341 invoked by uid 22791); 20 Apr 2010 20:24:17 -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; Tue, 20 Apr 2010 20:24:11 +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 o3KKO9HA011511 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 20 Apr 2010 16:24:09 -0400 Received: from qcore.mollernet.net (vpn-9-39.rdu.redhat.com [10.11.9.39]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3KKO8jB009120; Tue, 20 Apr 2010 16:24:09 -0400 Message-ID: <4BCE0D68.2060408@redhat.com> Date: Tue, 20 Apr 2010 20:24: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: PR10687 Printing c++ class with static array (of same type) can produce infinite output References: <4BC524E8.404@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/msg00642.txt.bz2 On 04/20/10 14:27, Tom Tromey wrote: >>>>>> "Chris" == Chris Moller writes: >>>>>> > > Chris> Added yet another recursion detector (the third, so far as I noticed) > Chris> to cp-valprint.c. This one detects recursing static arrays which, > Chris> although it comes unstuck in the same place as the 9067 recursing > Chris> static structs, comes unstuck in a different way and thus needs a > Chris> slightly different mechanism to detect. > > Thanks. > > A couple nits and then this is ok. > > Chris> addr = value_address (val); > Chris> + > Chris> obstack_grow (&dont_print_statmem_obstack, (char *)&addr, > Chris> sizeof (CORE_ADDR)); > > Chris> CHECK_TYPEDEF (type); > Chris> + > Chris> cp_print_value_fields (type, value_enclosing_type (val), > Chris> value_contents_all (val), > Chris> value_embedded_offset (val), addr, > > These two newline additions seem gratuitous. > > Chris> + struct type * target_type = TYPE_TARGET_TYPE (type); > > No space after the "*" here. > > This is ok with those changes. Thanks. > Nits fixed and patch committed. Chris > Tom >