From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9540 invoked by alias); 23 Apr 2010 23:34:21 -0000 Received: (qmail 9522 invoked by uid 22791); 23 Apr 2010 23:34: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; Fri, 23 Apr 2010 23:34:08 +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 o3NNY708001546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 23 Apr 2010 19:34:07 -0400 Received: from [IPv6:::1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3NNY2EZ020762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 23 Apr 2010 19:34:05 -0400 Message-ID: <4BD22E6A.9020309@redhat.com> Date: Fri, 23 Apr 2010 23:34:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc11 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: tromey@redhat.com CC: gdb-patches@sourceware.org Subject: Re: [RFA] Delayed physname computation References: <4BCE0D3C.7040201@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/msg00824.txt.bz2 On 04/23/2010 04:03 PM, Tom Tromey wrote: > Keith> +static void > Keith> +add_to_method_list (struct type *type, int fnfield_index, int index, > Keith> + const char *name, struct die_info *die, > Keith> + struct dwarf2_cu *cu) > > This needs some kind of header comment. It can be pretty mild. Done. > Keith> + physname = (char *) dwarf2_physname ((char *) mi->name, mi->die, cu); > > It would be nice to make all this stuff const-correct. It is definitely > not needed for this patch, I just didn't notice this earlier. I'll add that to my immediate TODO list. > I didn't go dig through the code, so consider this a conditional > request. If we are careful about cleanups here, then this needs a > cleanup; otherwise an error results in a memory leak. If we aren't > already careful, then don't bother, I think we will need to make a pass > through this to make the reader a bit more robust in the face of weird > DWARF. In this case, either file a bug or let me know and I will file > one. Yeah, I wasn't 100% sure whether this needed a cleanup, either. Nonetheless, we have two options, catch any errors (which I think was suggested in another thread for a different problem) or add a cleanup. A little paranoia can't hurt that much. If you have a preference, I'll implement that. > Keith> complaint (&symfile_complaints, _("member function type missing for '%s'"), > Keith> - physname); > Keith> + dwarf2_physname (fieldname, die, cu)); > > Can this call to dwarf2_physname exhibit the problem that this patch is > trying to circumvent? Unfortunately, it very well could. I guess it would be almost as useful if this called dwarf2_fullname instead. What do you think? Keith