Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@redhat.com>
To: ezannoni@redhat.com
Cc: kevinb@redhat.com, Peter.Schauer@regent.e-technik.tu-muenchen.de,
	gdb@sources.redhat.com, gdb-patches@sources.redhat.com
Subject: Re: [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING
Date: Wed, 24 Apr 2002 01:03:00 -0000	[thread overview]
Message-ID: <20020424.005356.93405052.davem@redhat.com> (raw)
In-Reply-To: <15557.45152.933354.110197@localhost.redhat.com>

   From: Elena Zannoni <ezannoni@redhat.com>
   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.

Done, as follows:

2002-04-24  David S. Miller  <davem@redhat.com>

	* 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 */
 \f
 
 /* 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. */
 


  parent reply	other threads:[~2002-04-24  8:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020422.040949.16307644.davem@redhat.com>
     [not found] ` <1020422152449.ZM1373@localhost.localdomain>
2002-04-23  3:10   ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING (was Re: multi-arch TODO) David S. Miller
2002-04-23  6:52     ` Eli Zaretskii
2002-04-23  7:01       ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING David S. Miller
2002-04-23  9:05         ` Eli Zaretskii
2002-04-23  9:43     ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING (was Re: multi-arch TODO) Kevin Buettner
2002-04-23 10:58       ` Michael Snyder
2002-04-23 12:10         ` Kevin Buettner
2002-04-23 23:11           ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING David S. Miller
2002-04-23 12:05     ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING (was Re: multi-arch TODO) Elena Zannoni
2002-04-23 23:13       ` [RFA] Kill SOFUN_ADDRESS_MAYBE_MISSING David S. Miller
2002-04-24  1:03       ` David S. Miller [this message]
2002-04-24 17:40         ` Elena Zannoni
2002-04-24 17:53           ` David S. Miller
2002-04-24  1:13       ` David S. Miller
2002-04-24  8:35 Michael Elizabeth Chastain
2002-04-24 17:48 ` Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020424.005356.93405052.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=Peter.Schauer@regent.e-technik.tu-muenchen.de \
    --cc=ezannoni@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=kevinb@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox