From 166d7e5549bbc71127a6d1521f9725fd5d56e239 Mon Sep 17 00:00:00 2001 From: Dawn Perchik Date: Mon, 22 Sep 1997 22:52:23 +0000 Subject: [PATCH] * stabsread.h, symtab.h, dbxread.c, symtab.c, stabsread.c: Fix prototypes. Remove function scoped function declarations. --- gdb/ChangeLog | 5 +++++ gdb/dbxread.c | 5 +---- gdb/stabsread.c | 41 +++++++++++++---------------------------- gdb/stabsread.h | 22 +++++++++++++++++----- 4 files changed, 36 insertions(+), 37 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9e88fd4747..90612fa65d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +Mon Sep 22 15:32:06 1997 Dawn Perchik + + * stabsread.h, symtab.h, dbxread.c, symtab.c, stabsread.c: + Fix prototypes. Remove function scoped function declarations. + Fri Sep 19 18:51:26 1997 Felix Lee * config/i386/windows.mh (XDEPFILES): need to list some files diff --git a/gdb/dbxread.c b/gdb/dbxread.c index 2f57096c42..ad2fe0861c 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -2378,13 +2378,10 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile) ahead and add it. Otherwise, just return sym. */ char *s; int refnum; - extern int symbol_reference_defined PARAMS ((char **)); - extern void ref_add PARAMS ((int, struct symbol *, char *, CORE_ADDR)); - extern struct symbol * ref_search PARAMS ((int)); - /* If defined, store away a pointer to the symbol; we'll use it later when we resolve references in "resolve_symbol_reference". */ + s = name; if (refnum = symbol_reference_defined (&s), refnum) if (!ref_search (refnum)) diff --git a/gdb/stabsread.c b/gdb/stabsread.c index a03fc1ce32..e8b0844ebb 100644 --- a/gdb/stabsread.c +++ b/gdb/stabsread.c @@ -154,21 +154,22 @@ read_cpp_abbrev PARAMS ((struct field_info *, char **, struct type *, static int copy_cfront_struct_fields PARAMS ((struct field_info *, struct type *, - struct objfile *)); + struct objfile *)); static char * get_cfront_method_physname PARAMS ((char *)); static int read_cfront_baseclasses PARAMS ((struct field_info *, char **, - struct type *, struct objfile *)); + struct type *, struct objfile *)); static int read_cfront_static_fields PARAMS ((struct field_info *, char**, - struct type *, struct objfile *)); + struct type *, struct objfile *)); static int read_cfront_member_functions PARAMS ((struct field_info *, char **, - struct type *, struct objfile *)); + struct type *, struct objfile *)); + /* end new functions added for cfront support */ static void @@ -184,10 +185,11 @@ process_reference PARAMS ((char **string)); static CORE_ADDR ref_search_value PARAMS ((int refnum)); -struct symbol * -ref_search PARAMS ((int refnum)); - +static void +ref_init PARAMS ((void)); +static char * +get_substring PARAMS ((char ** p, int c)); static const char vptr_name[] = { '_','v','p','t','r',CPLUS_MARKER,'\0' }; static const char vb_name[] = { '_','v','b',CPLUS_MARKER,'\0' }; @@ -1160,7 +1162,8 @@ static struct ref_map_s leave as is, as long as we read and process an object's symbol table all at once. */ static int ref_count = 0; /* Ptr to free cell in linked list. */ -static void ref_init () +static void +ref_init () { ref_count = 0; memset (ref_map, 0, MAX_REFS * sizeof (struct ref_map_s)); @@ -1188,24 +1191,6 @@ ref_add (refnum, sym, stabs, value) ref_map[refnum].value = value; } -/* Remove reference at refnum. - This should be called before a new symbol table is read to clear out the - previous symbol's reference information. */ -/* FIXME! not used at the moment. */ -static void -ref_rmv (refnum) - int refnum; -{ - if (ref_count < 0) - error ("slots are empty\n"); - if (refnum < 0 || refnum > ref_count) - error ("No reference for refnum.\n"); - /* Copy last element over the removed element and reduce count. */ - ref_map[refnum].stabs = ref_map[ref_count].stabs; - ref_map[refnum].sym = ref_map[ref_count].sym; - --ref_count; -} - /* Return defined sym for the reference "refnum" */ struct symbol * ref_search (refnum) @@ -1217,7 +1202,7 @@ ref_search (refnum) } /* Return value for the reference "refnum" */ -CORE_ADDR +static CORE_ADDR ref_search_value (refnum) int refnum; { @@ -2170,7 +2155,7 @@ resolve_live_range (objfile, sym, p) return 0; } -void +static void add_live_range (objfile, sym, start, end) struct objfile *objfile; struct symbol *sym; diff --git a/gdb/stabsread.h b/gdb/stabsread.h index dcaa6da3b4..75617268d1 100644 --- a/gdb/stabsread.h +++ b/gdb/stabsread.h @@ -168,9 +168,6 @@ end_stabs PARAMS ((void)); extern void finish_global_stabs PARAMS ((struct objfile *objfile)); -extern int -resolve_cfront_continuation PARAMS((struct objfile * objfile, - struct symbol * sym, char * p)); EXTERN int os9k_stabs; @@ -236,7 +233,22 @@ extern void stabsect_build_psymtabs extern void elfstab_offset_sections PARAMS ((struct objfile *, struct partial_symtab *)); -extern void process_later PARAMS ((struct symbol *, char *, - int (*f) (struct objfile *, struct symbol *, char *))); +extern void process_later + PARAMS ((struct symbol *, char *, + int (*f) PARAMS ((struct objfile *, struct symbol *, char *)))); + +extern int symbol_reference_defined PARAMS ((char **)); + +extern void ref_add PARAMS ((int, struct symbol *, char *, CORE_ADDR)); + +extern struct symbol * ref_search PARAMS ((int)); + +extern struct symbol * resolve_reference PARAMS ((char *p)); + +extern int resolve_symbol_reference + PARAMS ((struct objfile * objfile, struct symbol * sym, char * p)); + +extern int resolve_cfront_continuation + PARAMS ((struct objfile * objfile, struct symbol * sym, char * p)); #undef EXTERN -- 2.34.1