aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@redhat.com>2002-04-24 08:00:54 +0000
committerDavid S. Miller <davem@redhat.com>2002-04-24 08:00:54 +0000
commit4867e41ec74924c20f3c3c83984f0ccad9b320ba (patch)
treefafabff0235d0b8d553a08e472fa7f5b253d6551
parent69cdf6a234c156e3c334a15f0e0c7ebeb72c5618 (diff)
downloadgdb-4867e41ec74924c20f3c3c83984f0ccad9b320ba.zip
gdb-4867e41ec74924c20f3c3c83984f0ccad9b320ba.tar.gz
gdb-4867e41ec74924c20f3c3c83984f0ccad9b320ba.tar.bz2
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.
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/dbxread.c46
-rw-r--r--gdb/minsyms.c46
-rw-r--r--gdb/symtab.h4
4 files changed, 52 insertions, 50 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c24d99d..5d2470c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2002-04-20 David S. Miller <davem@redhat.com>
* sparc-tdep.c (sparc_pop_frame): Only need to allocate
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 16d0043..9b2b73b 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -1230,6 +1230,52 @@ read_dbx_dynamic_symtab (struct objfile *objfile)
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. */
diff --git a/gdb/minsyms.c b/gdb/minsyms.c
index a4997bf..4fa1d91 100644
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -504,52 +504,6 @@ lookup_minimal_symbol_by_pc (CORE_ADDR pc)
{
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,
diff --git a/gdb/symtab.h b/gdb/symtab.h
index ec1b058..231364e 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1139,10 +1139,6 @@ extern struct minimal_symbol *prim_record_minimal_symbol_and_info
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 *);