From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32174 invoked by alias); 9 Sep 2003 22:17:46 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 32167 invoked from network); 9 Sep 2003 22:17:46 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Sep 2003 22:17:46 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h89MHil28590 for ; Tue, 9 Sep 2003 18:17:45 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h89MHie05089 for ; Tue, 9 Sep 2003 18:17:44 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id h89MHhba020056; Tue, 9 Sep 2003 18:17:43 -0400 Received: by localhost.redhat.com (Postfix, from userid 469) id EA5A92CB35; Tue, 9 Sep 2003 17:44:59 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16222.18907.572350.938649@localhost.redhat.com> Date: Tue, 09 Sep 2003 22:17:00 -0000 To: David Carlton Cc: Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [rfa] generate symbols associated to namespaces In-Reply-To: References: <20030622173547.GA22603@nevyn.them.org> <20030624185019.GA24662@nevyn.them.org> <16222.12105.616302.481564@localhost.redhat.com> X-SW-Source: 2003-09/txt/msg00182.txt.bz2 David Carlton writes: > On Tue, 9 Sep 2003 15:51:37 -0400, Elena Zannoni said: > > David Carlton writes: > > >> + psym = add_psymbol_to_list (pdi->name, strlen (pdi->name), > >> + VAR_DOMAIN, LOC_STATIC, > >> + &objfile->static_psymbols, > >> + 0, addr + baseaddr, > >> + cu_language, objfile); > > > I don't like this too much. I.e. changing add_psymbol_to_list to > > return a value so you can get a hold of the psym. After all, > > add_psymbol_to_list doesn't change any of the fields of the psymbol, > > and cp_check_possible_namespace_symbols uses 2 fields that you > > already have around. > > No, add_psymbol_to_list does change the fields: it calls > SYMBOL_SET_NAMES to set the demangled name, which I need in > cp_check_possible_namespace_symbols. So having add_psymbol_to_list > return the psymbol seems the best solution; I suppose I could break > out the demangled-name-caching code that SYMBOL_SET_NAMES uses into a > separate function, but it doesn't seem worth it here. > Oh, right. I really don't like it. Only these few callers of add_psymbol_to_list use its return value. But you are right, that function does quite a bit. Sigh. I don't see any alternative, then. Ok on the rest. elena