From: Tom Tromey Date: Fri, 12 Oct 2001 03:38:12 +0000 (+0000) Subject: * symtab.c (lookup_symtab): Removed. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b15f1fad9b1efdc6b2c6057fd01ea951dc5abe6;p=binutils-gdb.git * symtab.c (lookup_symtab): Removed. (lookup_symtab_1): Renamed to lookup_symtab. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cb151d0931c..d54c546bd5a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2001-10-11 Tom Tromey + + * symtab.c (lookup_symtab): Removed. + (lookup_symtab_1): Renamed to lookup_symtab. + 2001-10-10 Christopher Faylor * win32-nat.c (get_child_debug_event): Close file handles created after diff --git a/gdb/symtab.c b/gdb/symtab.c index dcaae5287c8..237006f208c 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -79,8 +79,6 @@ static struct partial_symbol *lookup_partial_symbol (struct partial_symtab *, const char *, int, namespace_enum); -static struct symtab *lookup_symtab_1 (const char *); - static struct symbol *lookup_symbol_aux (const char *name, const struct block *block, const namespace_enum namespace, int @@ -137,8 +135,8 @@ cplusplus_hint (char *name) psymtabs. *If* there is no '/' in the name, a match after a '/' in the symtab filename will also work. */ -static struct symtab * -lookup_symtab_1 (const char *name) +struct symtab * +lookup_symtab (const char *name) { register struct symtab *s; register struct partial_symtab *ps; @@ -188,42 +186,6 @@ got_symtab: goto got_symtab; } -/* Lookup the symbol table of a source file named NAME. Try a couple - of variations if the first lookup doesn't work. */ - -struct symtab * -lookup_symtab (const char *name) -{ - register struct symtab *s; -#if 0 - register char *copy; -#endif - - s = lookup_symtab_1 (name); - if (s) - return s; - -#if 0 - /* This screws c-exp.y:yylex if there is both a type "tree" and a symtab - "tree.c". */ - - /* If name not found as specified, see if adding ".c" helps. */ - /* Why is this? Is it just a user convenience? (If so, it's pretty - questionable in the presence of C++, FORTRAN, etc.). It's not in - the GDB manual. */ - - copy = (char *) alloca (strlen (name) + 3); - strcpy (copy, name); - strcat (copy, ".c"); - s = lookup_symtab_1 (copy); - if (s) - return s; -#endif /* 0 */ - - /* We didn't find anything; die. */ - return 0; -} - /* Lookup the partial symbol table of a source file named NAME. *If* there is no '/' in the name, a match after a '/' in the psymtab filename will also work. */