From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14804 invoked by alias); 25 Mar 2004 20:44:26 -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 14794 invoked from network); 25 Mar 2004 20:44:24 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 25 Mar 2004 20:44:24 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i2PKiOWA015220 for ; Thu, 25 Mar 2004 15:44:24 -0500 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i2PKiMj17747; Thu, 25 Mar 2004 15:44:22 -0500 To: gdb-patches@sources.redhat.com Subject: Re: [RFA] minsyms.c: Fix switching to GNU v3 ABI References: <20040310105709.GJ25204@cygbert.vinschen.de> <20040310150822.GA31014@nevyn.them.org> <20040310155450.GN25204@cygbert.vinschen.de> <20040310160410.GA410@nevyn.them.org> <20040310161617.GO25204@cygbert.vinschen.de> <20040310162011.GA1067@nevyn.them.org> <20040310163416.GP25204@cygbert.vinschen.de> <20040310163716.GA2114@nevyn.them.org> <20040310175446.GR25204@cygbert.vinschen.de> <20040310182259.GT25204@cygbert.vinschen.de> From: Jim Blandy Date: Thu, 25 Mar 2004 20:44:00 -0000 In-Reply-To: <20040310182259.GT25204@cygbert.vinschen.de> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-03/txt/msg00635.txt.bz2 This looks good. One comment: I notice that we actually remove the leading character earlier in prim_record_minimal_symbol_and_info, to check if the name is the same as that of the GCC compilation marker symbol. It would be nicer if we could just remove the leading character once, at the top of the function, and then simplify the the "__gnu_compiled" test. Doing so shouldn't interfere with the GCC_COMPILED_FLAG_SYMBOL tests, since the code already presumes those both start with 'g'. If that works, please commit. Corinna Vinschen writes: > On Mar 10 18:54, Corinna Vinschen wrote: > > * minsyms.c (install_minimal_symbols): Move dropping leading > > char from linkage name from here... > > (prim_record_minimal_symbol_and_info): ...to here. > > Corrected patch below. I forgot to remove the now unused leading_char > >From install_minimal_symbols. > > Corinna > > > Index: minsyms.c > =================================================================== > RCS file: /cvs/src/src/gdb/minsyms.c,v > retrieving revision 1.41 > diff -u -p -r1.41 minsyms.c > --- minsyms.c 9 Feb 2004 19:13:46 -0000 1.41 > +++ minsyms.c 10 Mar 2004 18:20:36 -0000 > @@ -611,6 +611,8 @@ prim_record_minimal_symbol_and_info (con > msymbol = &msym_bunch->contents[msym_bunch_index]; > SYMBOL_INIT_LANGUAGE_SPECIFIC (msymbol, language_unknown); > SYMBOL_LANGUAGE (msymbol) = language_auto; > + if (name[0] == get_symbol_leading_char (objfile->obfd)) > + ++name; > SYMBOL_SET_NAMES (msymbol, (char *)name, strlen (name), objfile); > > SYMBOL_VALUE_ADDRESS (msymbol) = address; > @@ -831,7 +833,6 @@ install_minimal_symbols (struct objfile > struct msym_bunch *bunch; > struct minimal_symbol *msymbols; > int alloc_count; > - char leading_char; > > if (msym_count > 0) > { > @@ -859,18 +860,11 @@ install_minimal_symbols (struct objfile > each bunch is full. */ > > mcount = objfile->minimal_symbol_count; > - leading_char = get_symbol_leading_char (objfile->obfd); > > for (bunch = msym_bunch; bunch != NULL; bunch = bunch->next) > { > for (bindex = 0; bindex < msym_bunch_index; bindex++, mcount++) > - { > - msymbols[mcount] = bunch->contents[bindex]; > - if (SYMBOL_LINKAGE_NAME (&msymbols[mcount])[0] == leading_char) > - { > - SYMBOL_LINKAGE_NAME (&msymbols[mcount])++; > - } > - } > + msymbols[mcount] = bunch->contents[bindex]; > msym_bunch_index = BUNCH_SIZE; > } > > > -- > Corinna Vinschen > Cygwin Developer > Red Hat, Inc.