From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23435 invoked by alias); 17 Apr 2012 14:27:46 -0000 Received: (qmail 23418 invoked by uid 22791); 17 Apr 2012 14:27:44 -0000 X-SWARE-Spam-Status: No, hits=-7.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,TW_BJ,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, 17 Apr 2012 14:27:13 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3HEQxsn008267 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 17 Apr 2012 10:26:59 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3HEQwfw017471; Tue, 17 Apr 2012 10:26:58 -0400 Message-ID: <4F8D7DB2.1000302@redhat.com> Date: Tue, 17 Apr 2012 14:29:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Tom Tromey CC: Joel Brobecker , gdb-patches@sourceware.org Subject: Re: RFC: bfd_section should not be NULL in call to prim_record_minimal_* References: <1334610821-10974-1-git-send-email-brobecker@adacore.com> <4F8D5EEC.30908@redhat.com> <87hawiwijp.fsf@fleche.redhat.com> In-Reply-To: <87hawiwijp.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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-04/txt/msg00476.txt.bz2 On 04/17/2012 03:15 PM, Tom Tromey wrote: > Pedro> Like in the patch below. When testing it, I ran linespec.exp > Pedro> first, and that revealed that msymbol_objfile had a bug in that > Pedro> it didn't look at all the pspaces, only the current (the test > Pedro> adds a second inferior, therefore a second pspace). Not good > Pedro> when you want to look up the objfile because you want to know the > Pedro> msyms' pspace to begin with. > > This seems odd to me. And, with the split objfile stuff, it would be > actively wrong, since a given msymbol could appear in multiple pspaces. > Now, normally I wouldn't mention a patch that isn't checked in yet, > but... Indeed. > > I think it would be better to pass the pspace around with the minimal > symbol in linespec.c. We certainly know it at the time we actually find > the minsym, so it is just a matter of not losing the information. > > Ok, I just looked at linespec.c again, and this is why there is an > objfile in minsym_and_objfile. > > Here's a totally untested patch based on this idea. I definitely like this even more. -- Pedro Alves