From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7740 invoked by alias); 25 Apr 2002 00:40:32 -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 7733 invoked from network); 25 Apr 2002 00:40:30 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by 209.249.29.67 with SMTP; 25 Apr 2002 00:40:30 -0000 Received: from localhost.redhat.com (romulus.sfbay.redhat.com [172.16.27.251]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id RAA19296; Wed, 24 Apr 2002 17:40:11 -0700 (PDT) Received: by localhost.redhat.com (Postfix, from userid 469) id 384B711414; Wed, 24 Apr 2002 20:39:43 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15559.20558.486889.932427@localhost.redhat.com> Date: Wed, 24 Apr 2002 17:40:00 -0000 To: "David S. Miller" Cc: ezannoni@redhat.com, kevinb@redhat.com, Peter.Schauer@regent.e-technik.tu-muenchen.de, gdb-patches@sources.redhat.com Subject: Re: [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING In-Reply-To: <20020424.005356.93405052.davem@redhat.com> References: <1020422152449.ZM1373@localhost.localdomain> <20020423.030048.41805003.davem@redhat.com> <15557.45152.933354.110197@localhost.redhat.com> <20020424.005356.93405052.davem@redhat.com> X-SW-Source: 2002-04/txt/msg00988.txt.bz2 David S. Miller writes: > From: Elena Zannoni > Date: Tue, 23 Apr 2002 15:05:04 -0400 > > About symtab.h: it is possible to remove the find_stab_function_addr > by making the function static in dbxread.c, and moving its definition > there from minsyms.c. I would consider that an obvious fix. I assume you checked it in? If not, please do. Elena > > Done, as follows: > > 2002-04-24 David S. Miller > > * symtab.h (find_stab_function_addr): Kill extern. > * minsyms.c (find_stab_function_addr): Remove from here... > * dbxread.c: ... to here, and mark it static. > > --- ./symtab.h.~1~ Tue Apr 9 13:51:33 2002 > +++ ./symtab.h Wed Apr 24 00:15:32 2002 > @@ -1139,10 +1139,6 @@ > enum minimal_symbol_type, > char *info, int section, asection * bfd_section, struct objfile *); > > -#ifdef SOFUN_ADDRESS_MAYBE_MISSING > -extern CORE_ADDR find_stab_function_addr (char *, char *, struct objfile *); > -#endif > - > extern unsigned int msymbol_hash_iw (const char *); > > extern unsigned int msymbol_hash (const char *); > --- ./minsyms.c.~1~ Tue Mar 19 11:00:04 2002 > +++ ./minsyms.c Wed Apr 24 00:16:29 2002 > @@ -504,52 +504,6 @@ > { > return lookup_minimal_symbol_by_pc_section (pc, find_pc_mapped_section (pc)); > } > - > -#ifdef SOFUN_ADDRESS_MAYBE_MISSING > -CORE_ADDR > -find_stab_function_addr (char *namestring, char *filename, > - struct objfile *objfile) > -{ > - struct minimal_symbol *msym; > - char *p; > - int n; > - > - p = strchr (namestring, ':'); > - if (p == NULL) > - p = namestring; > - n = p - namestring; > - p = alloca (n + 2); > - strncpy (p, namestring, n); > - p[n] = 0; > - > - msym = lookup_minimal_symbol (p, filename, objfile); > - if (msym == NULL) > - { > - /* Sun Fortran appends an underscore to the minimal symbol name, > - try again with an appended underscore if the minimal symbol > - was not found. */ > - p[n] = '_'; > - p[n + 1] = 0; > - msym = lookup_minimal_symbol (p, filename, objfile); > - } > - > - if (msym == NULL && filename != NULL) > - { > - /* Try again without the filename. */ > - p[n] = 0; > - msym = lookup_minimal_symbol (p, NULL, objfile); > - } > - if (msym == NULL && filename != NULL) > - { > - /* And try again for Sun Fortran, but without the filename. */ > - p[n] = '_'; > - p[n + 1] = 0; > - msym = lookup_minimal_symbol (p, NULL, objfile); > - } > - > - return msym == NULL ? 0 : SYMBOL_VALUE_ADDRESS (msym); > -} > -#endif /* SOFUN_ADDRESS_MAYBE_MISSING */ > > > /* Return leading symbol character for a BFD. If BFD is NULL, > --- ./dbxread.c.~1~ Thu Mar 21 11:48:54 2002 > +++ ./dbxread.c Wed Apr 24 00:16:48 2002 > @@ -1230,6 +1230,52 @@ > do_cleanups (back_to); > } > > +#ifdef SOFUN_ADDRESS_MAYBE_MISSING > +CORE_ADDR > +find_stab_function_addr (char *namestring, char *filename, > + struct objfile *objfile) > +{ > + struct minimal_symbol *msym; > + char *p; > + int n; > + > + p = strchr (namestring, ':'); > + if (p == NULL) > + p = namestring; > + n = p - namestring; > + p = alloca (n + 2); > + strncpy (p, namestring, n); > + p[n] = 0; > + > + msym = lookup_minimal_symbol (p, filename, objfile); > + if (msym == NULL) > + { > + /* Sun Fortran appends an underscore to the minimal symbol name, > + try again with an appended underscore if the minimal symbol > + was not found. */ > + p[n] = '_'; > + p[n + 1] = 0; > + msym = lookup_minimal_symbol (p, filename, objfile); > + } > + > + if (msym == NULL && filename != NULL) > + { > + /* Try again without the filename. */ > + p[n] = 0; > + msym = lookup_minimal_symbol (p, NULL, objfile); > + } > + if (msym == NULL && filename != NULL) > + { > + /* And try again for Sun Fortran, but without the filename. */ > + p[n] = '_'; > + p[n + 1] = 0; > + msym = lookup_minimal_symbol (p, NULL, objfile); > + } > + > + return msym == NULL ? 0 : SYMBOL_VALUE_ADDRESS (msym); > +} > +#endif /* SOFUN_ADDRESS_MAYBE_MISSING */ > + > /* Setup partial_symtab's describing each source file for which > debugging information is available. */ >