From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17188 invoked by alias); 19 Jun 2012 17:24:30 -0000 Received: (qmail 17156 invoked by uid 22791); 19 Jun 2012 17:24:24 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,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, 19 Jun 2012 17:24: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.14.4/8.14.4) with ESMTP id q5JHO7JE025225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 19 Jun 2012 13:24:07 -0400 Received: from barimba (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 q5JHO5mE005708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 19 Jun 2012 13:24:06 -0400 From: Tom Tromey To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: Regression for -gstabs+ [Re: FYI: fix spelling of "delete" in c-exp.y] References: <87k3z4pdzg.fsf@fleche.redhat.com> <20120619104843.GA22015@host2.jankratochvil.net> <877gv3pf4g.fsf@fleche.redhat.com> Date: Tue, 19 Jun 2012 17:24:00 -0000 In-Reply-To: <877gv3pf4g.fsf@fleche.redhat.com> (Tom Tromey's message of "Tue, 19 Jun 2012 08:09:51 -0600") Message-ID: <87zk7zmczu.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2012-06/txt/msg00619.txt.bz2 >>>>> "Tom" == Tom Tromey writes: Tom> I'll revert it and figure out a different fix. Ok, I take that back. I did some more debugging and I think my fix is correct. First, abstractly, it does not make sense to try to look up a name with a trailing space. No such symbol ever exists -- partial symbols have the argument (and any possible space) stripped, and full symbols have the arguments. Second, as noted earlier, psymtab_search_name will not strip this trailing space. (And why should it? It is invalid.) Third, the actual failure occurs in value_struct_elt_for_reference, in the loop over function fields: if (t_field_name && strcmp (t_field_name, name) == 0) Here the function field is: (top-gdb) p t_field_name $27 = 0x2158539 "operator delete" But we are searching for: (top-gdb) p name $23 = 0x2767c10 "operator delete " Now, arguably perhaps this spot should use strcmp_iw. However, strcmp_iw is evil; and secondly, there ought to be no reason to do so, because the other lookup paths ensure that the search name doesn't have a trailing space. I think your earlier patch was correct, but the c-exp.y part was just not needed. I couldn't reproduce any crashing failure using -gstabs+ with the current tree (I tried the two .exp files you mentioned in your original post). So in sum, I'm leaving things as they are. Tom