Index: ax-gdb.c =================================================================== RCS file: /cvs/src/src/gdb/ax-gdb.c,v retrieving revision 1.61 diff -u -p -r1.61 ax-gdb.c --- ax-gdb.c 15 Jan 2010 22:37:17 -0000 1.61 +++ ax-gdb.c 28 Jan 2010 23:15:00 -0000 @@ -1810,7 +1810,7 @@ gen_expr (struct expression *exp, union /* Calling lookup_block_symbol is necessary to get the LOC_REGISTER symbol instead of the LOC_ARG one (if both exist). */ - sym = lookup_block_symbol (b, this_name, NULL, VAR_DOMAIN); + sym = lookup_block_symbol (b, this_name, VAR_DOMAIN); if (!sym) error (_("no `%s' found"), this_name); Index: ada-lang.c =================================================================== RCS file: /cvs/src/src/gdb/ada-lang.c,v retrieving revision 1.247 diff -u -p -r1.247 ada-lang.c --- ada-lang.c 20 Jan 2010 03:34:25 -0000 1.247 +++ ada-lang.c 28 Jan 2010 23:15:06 -0000 @@ -4781,14 +4781,10 @@ ada_lookup_symbol (const char *name, con static struct symbol * ada_lookup_symbol_nonlocal (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain) { - if (linkage_name == NULL) - linkage_name = name; - return ada_lookup_symbol (linkage_name, block_static_block (block), domain, - NULL); + return ada_lookup_symbol (name, block_static_block (block), domain, NULL); } Index: cp-namespace.c =================================================================== RCS file: /cvs/src/src/gdb/cp-namespace.c,v retrieving revision 1.33 diff -u -p -r1.33 cp-namespace.c --- cp-namespace.c 26 Jan 2010 16:47:34 -0000 1.33 +++ cp-namespace.c 28 Jan 2010 23:15:09 -0000 @@ -34,14 +34,12 @@ #include "buildsym.h" static struct symbol *lookup_namespace_scope (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain, const char *scope, int scope_len); static struct symbol *lookup_symbol_file (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain, int anonymous_namespace); @@ -223,26 +221,23 @@ cp_add_using (const char *dest, /* The C++-specific version of name lookup for static and global names. This makes sure that names get looked for in all namespaces that are in scope. NAME is the natural name of the symbol that - we're looking for, LINKAGE_NAME (which is optional) is its linkage - name, BLOCK is the block that we're searching within, DOMAIN says - what kind of symbols we're looking for, and if SYMTAB is non-NULL, - we should store the symtab where we found the symbol in it. */ + we're looking for, BLOCK is the block that we're searching within, + DOMAIN says what kind of symbols we're looking for, and if SYMTAB is + non-NULL, we should store the symtab where we found the symbol in it. */ struct symbol * cp_lookup_symbol_nonlocal (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain) { struct symbol *sym; const char *scope = block_scope (block); - sym = lookup_namespace_scope (name, linkage_name, block, domain, scope, 0); + sym = lookup_namespace_scope (name, block, domain, scope, 0); if (sym != NULL) return sym; - return cp_lookup_symbol_namespace (scope, name, linkage_name, block, domain, - 1); + return cp_lookup_symbol_namespace (scope, name, block, domain, 1); } /* Look up NAME in the C++ namespace NAMESPACE. Other arguments are as in @@ -251,14 +246,12 @@ cp_lookup_symbol_nonlocal (const char *n static struct symbol * cp_lookup_symbol_in_namespace (const char *namespace, const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain) { if (namespace[0] == '\0') { - return lookup_symbol_file (name, linkage_name, block, - domain, 0); + return lookup_symbol_file (name, block, domain, 0); } else { @@ -267,8 +260,8 @@ cp_lookup_symbol_in_namespace (const cha strcpy (concatenated_name, namespace); strcat (concatenated_name, "::"); strcat (concatenated_name, name); - return lookup_symbol_file (concatenated_name, linkage_name, - block, domain,cp_is_anonymous (namespace)); + return lookup_symbol_file (concatenated_name, block, + domain,cp_is_anonymous (namespace)); } } @@ -302,7 +295,6 @@ reset_directive_searched (void *data) static struct symbol * cp_lookup_symbol_imports (const char *scope, const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain, const int search_parents) @@ -314,8 +306,7 @@ cp_lookup_symbol_imports (const char *sc struct cleanup *searched_cleanup; /* First, try to find the symbol in the given namespace. */ - sym = cp_lookup_symbol_in_namespace (scope, name, linkage_name, block, - domain); + sym = cp_lookup_symbol_in_namespace (scope, name, block, domain); if (sym != NULL) return sym; @@ -346,7 +337,6 @@ cp_lookup_symbol_imports (const char *sc sym = cp_lookup_symbol_namespace (current->import_src, name, - linkage_name, block, domain, 0); @@ -369,7 +359,6 @@ cp_lookup_symbol_imports (const char *sc struct symbol* cp_lookup_symbol_namespace (const char *scope, const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain, const int search_parents) @@ -379,7 +368,7 @@ cp_lookup_symbol_namespace (const char * /* Search for name in namespaces imported to this and parent blocks. */ while (block != NULL) { - sym = cp_lookup_symbol_imports (scope, name, linkage_name, block, domain, + sym = cp_lookup_symbol_imports (scope, name, block, domain, search_parents); if (sym) @@ -408,7 +397,6 @@ cp_lookup_symbol_namespace (const char * static struct symbol * lookup_namespace_scope (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain, const char *scope, @@ -430,8 +418,7 @@ lookup_namespace_scope (const char *name new_scope_len += 2; } new_scope_len += cp_find_first_component (scope + new_scope_len); - sym = lookup_namespace_scope (name, linkage_name, block, - domain, scope, new_scope_len); + sym = lookup_namespace_scope (name, block, domain, scope, new_scope_len); if (sym != NULL) return sym; } @@ -442,8 +429,7 @@ lookup_namespace_scope (const char *name namespace = alloca (scope_len + 1); strncpy (namespace, scope, scope_len); namespace[scope_len] = '\0'; - return cp_lookup_symbol_in_namespace (namespace, name, linkage_name, - block, domain); + return cp_lookup_symbol_in_namespace (namespace, name, block, domain); } /* Look up NAME in BLOCK's static block and in global blocks. If @@ -453,14 +439,13 @@ lookup_namespace_scope (const char *name static struct symbol * lookup_symbol_file (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain, int anonymous_namespace) { struct symbol *sym = NULL; - sym = lookup_symbol_static (name, linkage_name, block, domain); + sym = lookup_symbol_static (name, block, domain); if (sym != NULL) return sym; @@ -473,12 +458,11 @@ lookup_symbol_file (const char *name, const struct block *global_block = block_global_block (block); if (global_block != NULL) - sym = lookup_symbol_aux_block (name, linkage_name, global_block, - domain); + sym = lookup_symbol_aux_block (name, global_block, domain); } else { - sym = lookup_symbol_global (name, linkage_name, block, domain); + sym = lookup_symbol_global (name, block, domain); } if (sym != NULL) @@ -528,7 +512,6 @@ cp_lookup_nested_type (struct type *pare const char *parent_name = TYPE_TAG_NAME (parent_type); struct symbol *sym = cp_lookup_symbol_in_namespace (parent_name, nested_name, - NULL, block, VAR_DOMAIN); if (sym == NULL || SYMBOL_CLASS (sym) != LOC_TYPEDEF) @@ -774,7 +757,7 @@ check_one_possible_namespace_symbol (con memcpy (name_copy, name, len); name_copy[len] = '\0'; - sym = lookup_block_symbol (block, name_copy, NULL, VAR_DOMAIN); + sym = lookup_block_symbol (block, name_copy, VAR_DOMAIN); if (sym == NULL) { @@ -815,7 +798,7 @@ lookup_possible_namespace_symbol (const struct symbol *sym; sym = lookup_block_symbol (get_possible_namespace_block (objfile), - name, NULL, VAR_DOMAIN); + name, VAR_DOMAIN); if (sym != NULL) return sym; Index: cp-support.c =================================================================== RCS file: /cvs/src/src/gdb/cp-support.c,v retrieving revision 1.35 diff -u -p -r1.35 cp-support.c --- cp-support.c 1 Jan 2010 07:31:30 -0000 1.35 +++ cp-support.c 28 Jan 2010 23:15:13 -0000 @@ -840,9 +840,9 @@ read_in_psymtabs (const char *func_name) if (ps->readin) continue; - if ((lookup_partial_symbol (ps, func_name, NULL, 1, VAR_DOMAIN) + if ((lookup_partial_symbol (ps, func_name, 1, VAR_DOMAIN) != NULL) - || (lookup_partial_symbol (ps, func_name, NULL, 0, VAR_DOMAIN) + || (lookup_partial_symbol (ps, func_name, 0, VAR_DOMAIN) != NULL)) psymtab_to_symtab (ps); } Index: cp-support.h =================================================================== RCS file: /cvs/src/src/gdb/cp-support.h,v retrieving revision 1.32 diff -u -p -r1.32 cp-support.h --- cp-support.h 26 Jan 2010 16:47:34 -0000 1.32 +++ cp-support.h 28 Jan 2010 23:15:16 -0000 @@ -102,13 +102,11 @@ extern void cp_set_block_scope (const st extern void cp_scan_for_anonymous_namespaces (const struct symbol *symbol); extern struct symbol *cp_lookup_symbol_nonlocal (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain); extern struct symbol *cp_lookup_symbol_namespace (const char *namespace, const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain, const int search_parents); Index: language.h =================================================================== RCS file: /cvs/src/src/gdb/language.h,v retrieving revision 1.62 diff -u -p -r1.62 language.h --- language.h 14 Jan 2010 08:03:36 -0000 1.62 +++ language.h 28 Jan 2010 23:15:19 -0000 @@ -237,7 +237,6 @@ struct language_defn variables. */ struct symbol *(*la_lookup_symbol_nonlocal) (const char *, - const char *, const struct block *, const domain_enum); Index: scm-valprint.c =================================================================== RCS file: /cvs/src/src/gdb/scm-valprint.c,v retrieving revision 1.29 diff -u -p -r1.29 scm-valprint.c --- scm-valprint.c 1 Jan 2010 07:31:41 -0000 1.29 +++ scm-valprint.c 28 Jan 2010 23:15:26 -0000 @@ -62,9 +62,9 @@ scm_inferior_print (struct type *type, L { /* XXX: Should we cache these symbols? */ gdb_output_sym = - lookup_symbol_global ("gdb_output", NULL, NULL, VAR_DOMAIN); + lookup_symbol_global ("gdb_output", NULL, VAR_DOMAIN); gdb_output_len_sym = - lookup_symbol_global ("gdb_output_length", NULL, NULL, VAR_DOMAIN); + lookup_symbol_global ("gdb_output_length", NULL, VAR_DOMAIN); if ((gdb_output_sym == NULL) || (gdb_output_len_sym == NULL)) ret = -1; Index: solib-darwin.c =================================================================== RCS file: /cvs/src/src/gdb/solib-darwin.c,v retrieving revision 1.11 diff -u -p -r1.11 solib-darwin.c --- solib-darwin.c 8 Jan 2010 22:52:03 -0000 1.11 +++ solib-darwin.c 28 Jan 2010 23:15:29 -0000 @@ -408,7 +408,6 @@ darwin_relocate_section_addresses (struc static struct symbol * darwin_lookup_lib_symbol (const struct objfile *objfile, const char *name, - const char *linkage_name, const domain_enum domain) { return NULL; Index: solib-svr4.c =================================================================== RCS file: /cvs/src/src/gdb/solib-svr4.c,v retrieving revision 1.116 diff -u -p -r1.116 solib-svr4.c --- solib-svr4.c 27 Jan 2010 00:32:09 -0000 1.116 +++ solib-svr4.c 28 Jan 2010 23:15:32 -0000 @@ -1961,7 +1961,6 @@ struct target_so_ops svr4_so_ops; static struct symbol * elf_lookup_lib_symbol (const struct objfile *objfile, const char *name, - const char *linkage_name, const domain_enum domain) { bfd *abfd; @@ -1979,8 +1978,7 @@ elf_lookup_lib_symbol (const struct objf if (abfd == NULL || scan_dyntag (DT_SYMBOLIC, abfd, NULL) != 1) return NULL; - return lookup_global_symbol_from_objfile - (objfile, name, linkage_name, domain); + return lookup_global_symbol_from_objfile (objfile, name, domain); } extern initialize_file_ftype _initialize_svr4_solib; /* -Wmissing-prototypes */ Index: solib.c =================================================================== RCS file: /cvs/src/src/gdb/solib.c,v retrieving revision 1.133 diff -u -p -r1.133 solib.c --- solib.c 20 Jan 2010 14:23:07 -0000 1.133 +++ solib.c 28 Jan 2010 23:15:35 -0000 @@ -1154,13 +1154,12 @@ show_auto_solib_add (struct ui_file *fil struct symbol * solib_global_lookup (const struct objfile *objfile, const char *name, - const char *linkage_name, const domain_enum domain) { struct target_so_ops *ops = solib_ops (target_gdbarch); if (ops->lookup_lib_global_symbol != NULL) - return ops->lookup_lib_global_symbol (objfile, name, linkage_name, domain); + return ops->lookup_lib_global_symbol (objfile, name, domain); return NULL; } Index: solist.h =================================================================== RCS file: /cvs/src/src/gdb/solist.h,v retrieving revision 1.29 diff -u -p -r1.29 solist.h --- solist.h 8 Jan 2010 22:52:04 -0000 1.29 +++ solist.h 28 Jan 2010 23:15:38 -0000 @@ -117,7 +117,6 @@ struct target_so_ops /* Hook for looking up global symbols in a library-specific way. */ struct symbol * (*lookup_lib_global_symbol) (const struct objfile *objfile, const char *name, - const char *linkage_name, const domain_enum domain); /* Given two so_list objects, one from the GDB thread list @@ -157,7 +156,6 @@ extern struct target_so_ops *current_tar /* Handler for library-specific global symbol lookup in solib.c. */ struct symbol *solib_global_lookup (const struct objfile *objfile, const char *name, - const char *linkage_name, const domain_enum domain); #endif Index: symmisc.c =================================================================== RCS file: /cvs/src/src/gdb/symmisc.c,v retrieving revision 1.67 diff -u -p -r1.67 symmisc.c --- symmisc.c 1 Jan 2010 07:31:42 -0000 1.67 +++ symmisc.c 28 Jan 2010 23:15:42 -0000 @@ -1143,7 +1143,7 @@ maintenance_check_symtabs (char *ignore, while (length--) { sym = lookup_block_symbol (b, SYMBOL_LINKAGE_NAME (*psym), - NULL, SYMBOL_DOMAIN (*psym)); + SYMBOL_DOMAIN (*psym)); if (!sym) { printf_filtered ("Static symbol `"); @@ -1160,7 +1160,7 @@ maintenance_check_symtabs (char *ignore, while (length--) { sym = lookup_block_symbol (b, SYMBOL_LINKAGE_NAME (*psym), - NULL, SYMBOL_DOMAIN (*psym)); + SYMBOL_DOMAIN (*psym)); if (!sym) { printf_filtered ("Global symbol `"); Index: symtab.c =================================================================== RCS file: /cvs/src/src/gdb/symtab.c,v retrieving revision 1.224 diff -u -p -r1.224 symtab.c --- symtab.c 26 Jan 2010 15:48:25 -0000 1.224 +++ symtab.c 28 Jan 2010 23:15:46 -0000 @@ -85,7 +86,6 @@ static int find_line_common (struct line char *operator_chars (char *p, char **end); static struct symbol *lookup_symbol_aux (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain, enum language language, @@ -93,20 +93,17 @@ static struct symbol *lookup_symbol_aux static struct symbol *lookup_symbol_aux_local (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain); static struct symbol *lookup_symbol_aux_symtabs (int block_index, const char *name, - const char *linkage_name, const domain_enum domain); static struct symbol *lookup_symbol_aux_psymtabs (int block_index, const char *name, - const char *linkage_name, const domain_enum domain); static int file_matches (char *, char **, int); @@ -1257,7 +1254,6 @@ lookup_symbol_in_language (const char *n { char *demangled_name = NULL; const char *modified_name = NULL; - const char *mangled_name = NULL; struct symbol *returnval; struct cleanup *cleanup = make_cleanup (null_cleanup, 0); @@ -1270,7 +1266,6 @@ lookup_symbol_in_language (const char *n demangled_name = cplus_demangle (name, DMGL_ANSI | DMGL_PARAMS); if (demangled_name) { - mangled_name = name; modified_name = demangled_name; make_cleanup (xfree, demangled_name); } @@ -1292,7 +1287,6 @@ lookup_symbol_in_language (const char *n DMGL_ANSI | DMGL_PARAMS | DMGL_JAVA); if (demangled_name) { - mangled_name = name; modified_name = demangled_name; make_cleanup (xfree, demangled_name); } @@ -1311,8 +1305,8 @@ lookup_symbol_in_language (const char *n modified_name = copy; } - returnval = lookup_symbol_aux (modified_name, mangled_name, block, - domain, lang, is_a_field_of_this); + returnval = lookup_symbol_aux (modified_name, block, domain, lang, + is_a_field_of_this); do_cleanups (cleanup); return returnval; @@ -1336,9 +1330,9 @@ lookup_symbol (const char *name, const s well. */ static struct symbol * -lookup_symbol_aux (const char *name, const char *linkage_name, - const struct block *block, const domain_enum domain, - enum language language, int *is_a_field_of_this) +lookup_symbol_aux (const char *name, const struct block *block, + const domain_enum domain, enum language language, + int *is_a_field_of_this) { struct symbol *sym; const struct language_defn *langdef; @@ -1354,7 +1348,7 @@ lookup_symbol_aux (const char *name, con /* Search specified block and its superiors. Don't search STATIC_BLOCK or GLOBAL_BLOCK. */ - sym = lookup_symbol_aux_local (name, linkage_name, block, domain); + sym = lookup_symbol_aux_local (name, block, domain); if (sym != NULL) return sym; @@ -1375,7 +1369,7 @@ lookup_symbol_aux (const char *name, con if (function_block && !dict_empty (BLOCK_DICT (function_block))) sym = lookup_block_symbol (function_block, langdef->la_name_of_this, - NULL, VAR_DOMAIN); + VAR_DOMAIN); if (sym) { struct type *t = sym->type; @@ -1403,7 +1397,7 @@ lookup_symbol_aux (const char *name, con /* Now do whatever is appropriate for LANGUAGE to look up static and global variables. */ - sym = langdef->la_lookup_symbol_nonlocal (name, linkage_name, block, domain); + sym = langdef->la_lookup_symbol_nonlocal (name, block, domain); if (sym != NULL) return sym; @@ -1413,11 +1407,11 @@ lookup_symbol_aux (const char *name, con desired name as a file-level static, then do psymtab-to-symtab conversion on the fly and return the found symbol. */ - sym = lookup_symbol_aux_symtabs (STATIC_BLOCK, name, linkage_name, domain); + sym = lookup_symbol_aux_symtabs (STATIC_BLOCK, name, domain); if (sym != NULL) return sym; - sym = lookup_symbol_aux_psymtabs (STATIC_BLOCK, name, linkage_name, domain); + sym = lookup_symbol_aux_psymtabs (STATIC_BLOCK, name, domain); if (sym != NULL) return sym; @@ -1428,8 +1422,7 @@ lookup_symbol_aux (const char *name, con Don't search STATIC_BLOCK or GLOBAL_BLOCK. */ static struct symbol * -lookup_symbol_aux_local (const char *name, const char *linkage_name, - const struct block *block, +lookup_symbol_aux_local (const char *name, const struct block *block, const domain_enum domain) { struct symbol *sym; @@ -1442,7 +1435,7 @@ lookup_symbol_aux_local (const char *nam while (block != static_block) { - sym = lookup_symbol_aux_block (name, linkage_name, block, domain); + sym = lookup_symbol_aux_block (name, block, domain); if (sym != NULL) return sym; @@ -1485,13 +1478,12 @@ lookup_objfile_from_block (const struct block_found appropriately. */ struct symbol * -lookup_symbol_aux_block (const char *name, const char *linkage_name, - const struct block *block, +lookup_symbol_aux_block (const char *name, const struct block *block, const domain_enum domain) { struct symbol *sym; - sym = lookup_block_symbol (block, name, linkage_name, domain); + sym = lookup_block_symbol (block, name, domain); if (sym) { block_found = block; @@ -1507,7 +1499,6 @@ lookup_symbol_aux_block (const char *nam struct symbol * lookup_global_symbol_from_objfile (const struct objfile *main_objfile, const char *name, - const char *linkage_name, const domain_enum domain) { const struct objfile *objfile; @@ -1526,7 +1517,7 @@ lookup_global_symbol_from_objfile (const { bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); - sym = lookup_block_symbol (block, name, linkage_name, domain); + sym = lookup_block_symbol (block, name, domain); if (sym) { block_found = block; @@ -1538,13 +1529,12 @@ lookup_global_symbol_from_objfile (const ALL_OBJFILE_PSYMTABS (objfile, ps) { if (!ps->readin - && lookup_partial_symbol (ps, name, linkage_name, - 1, domain)) + && lookup_partial_symbol (ps, name, 1, domain)) { s = PSYMTAB_TO_SYMTAB (ps); bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); - sym = lookup_block_symbol (block, name, linkage_name, domain); + sym = lookup_block_symbol (block, name, domain); return fixup_symbol_section (sym, (struct objfile *)objfile); } } @@ -1559,8 +1549,7 @@ lookup_global_symbol_from_objfile (const static symbols. */ static struct symbol * -lookup_symbol_aux_symtabs (int block_index, - const char *name, const char *linkage_name, +lookup_symbol_aux_symtabs (int block_index, const char *name, const domain_enum domain) { struct symbol *sym; @@ -1573,7 +1562,7 @@ lookup_symbol_aux_symtabs (int block_ind { bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, block_index); - sym = lookup_block_symbol (block, name, linkage_name, domain); + sym = lookup_block_symbol (block, name, domain); if (sym) { block_found = block; @@ -1591,7 +1580,6 @@ lookup_symbol_aux_symtabs (int block_ind static struct symbol * lookup_symbol_aux_psymtabs (int block_index, const char *name, - const char *linkage_name, const domain_enum domain) { struct symbol *sym; @@ -1605,13 +1593,12 @@ lookup_symbol_aux_psymtabs (int block_in ALL_PSYMTABS (objfile, ps) { if (!ps->readin - && lookup_partial_symbol (ps, name, linkage_name, - psymtab_index, domain)) + && lookup_partial_symbol (ps, name, psymtab_index, domain)) { s = PSYMTAB_TO_SYMTAB (ps); bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, block_index); - sym = lookup_block_symbol (block, name, linkage_name, domain); + sym = lookup_block_symbol (block, name, domain); if (!sym) { /* This shouldn't be necessary, but as a last resort try @@ -1628,7 +1615,7 @@ lookup_symbol_aux_psymtabs (int block_in block = BLOCKVECTOR_BLOCK (bv, block_index == GLOBAL_BLOCK ? STATIC_BLOCK : GLOBAL_BLOCK); - sym = lookup_block_symbol (block, name, linkage_name, domain); + sym = lookup_block_symbol (block, name, domain); if (!sym) error (_("Internal: %s symbol `%s' found in %s psymtab but not in symtab.\n%s may be an inlined function, or may be a template function\n(if a template, try specifying an instantiation: %s)."), block_index == GLOBAL_BLOCK ? "global" : "static", @@ -1647,7 +1634,6 @@ lookup_symbol_aux_psymtabs (int block_in struct symbol * basic_lookup_symbol_nonlocal (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain) { @@ -1681,11 +1667,11 @@ basic_lookup_symbol_nonlocal (const char than that one, so I don't think we should worry about that for now. */ - sym = lookup_symbol_static (name, linkage_name, block, domain); + sym = lookup_symbol_static (name, block, domain); if (sym != NULL) return sym; - return lookup_symbol_global (name, linkage_name, block, domain); + return lookup_symbol_global (name, block, domain); } /* Lookup a symbol in the static block associated to BLOCK, if there @@ -1693,14 +1679,13 @@ basic_lookup_symbol_nonlocal (const char struct symbol * lookup_symbol_static (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain) { const struct block *static_block = block_static_block (block); if (static_block != NULL) - return lookup_symbol_aux_block (name, linkage_name, static_block, domain); + return lookup_symbol_aux_block (name, static_block, domain); else return NULL; } @@ -1710,7 +1695,6 @@ lookup_symbol_static (const char *name, struct symbol * lookup_symbol_global (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain) { @@ -1720,15 +1704,15 @@ lookup_symbol_global (const char *name, /* Call library-specific lookup procedure. */ objfile = lookup_objfile_from_block (block); if (objfile != NULL) - sym = solib_global_lookup (objfile, name, linkage_name, domain); + sym = solib_global_lookup (objfile, name, domain); if (sym != NULL) return sym; - sym = lookup_symbol_aux_symtabs (GLOBAL_BLOCK, name, linkage_name, domain); + sym = lookup_symbol_aux_symtabs (GLOBAL_BLOCK, name, domain); if (sym != NULL) return sym; - return lookup_symbol_aux_psymtabs (GLOBAL_BLOCK, name, linkage_name, domain); + return lookup_symbol_aux_psymtabs (GLOBAL_BLOCK, name, domain); } int @@ -1752,14 +1736,11 @@ symbol_matches_domain (enum language sym } /* Look, in partial_symtab PST, for symbol whose natural name is NAME. - If LINKAGE_NAME is non-NULL, check in addition that the symbol's - linkage name matches it. Check the global symbols if GLOBAL, the - static symbols if not */ + Check the global symbols if GLOBAL, the static symbols if not. */ struct partial_symbol * lookup_partial_symbol (struct partial_symtab *pst, const char *name, - const char *linkage_name, int global, - domain_enum domain) + int global, domain_enum domain) { struct partial_symbol *temp; struct partial_symbol **start, **psym; @@ -1811,9 +1792,7 @@ lookup_partial_symbol (struct partial_sy internal_error (__FILE__, __LINE__, _("failed internal consistency check")); while (top <= real_top - && (linkage_name != NULL - ? strcmp (SYMBOL_LINKAGE_NAME (*top), linkage_name) == 0 - : SYMBOL_MATCHES_SEARCH_NAME (*top,name))) + && SYMBOL_MATCHES_SEARCH_NAME (*top, name)) { if (symbol_matches_domain (SYMBOL_LANGUAGE (*top), SYMBOL_DOMAIN (*top), domain)) @@ -1830,15 +1809,9 @@ lookup_partial_symbol (struct partial_sy for (psym = start; psym < start + length; psym++) { if (symbol_matches_domain (SYMBOL_LANGUAGE (*psym), - SYMBOL_DOMAIN (*psym), domain)) - { - if (linkage_name != NULL - ? strcmp (SYMBOL_LINKAGE_NAME (*psym), linkage_name) == 0 - : SYMBOL_MATCHES_SEARCH_NAME (*psym, name)) - { - return (*psym); - } - } + SYMBOL_DOMAIN (*psym), domain) + && SYMBOL_MATCHES_SEARCH_NAME (*psym, name)) + return (*psym); } } @@ -1880,7 +1853,7 @@ basic_lookup_transparent_type (const cha { bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + sym = lookup_block_symbol (block, name, STRUCT_DOMAIN); if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) { return SYMBOL_TYPE (sym); @@ -1889,13 +1862,12 @@ basic_lookup_transparent_type (const cha ALL_PSYMTABS (objfile, ps) { - if (!ps->readin && lookup_partial_symbol (ps, name, NULL, - 1, STRUCT_DOMAIN)) + if (!ps->readin && lookup_partial_symbol (ps, name, 1, STRUCT_DOMAIN)) { s = PSYMTAB_TO_SYMTAB (ps); bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + sym = lookup_block_symbol (block, name, STRUCT_DOMAIN); if (!sym) { /* This shouldn't be necessary, but as a last resort @@ -1904,7 +1876,7 @@ basic_lookup_transparent_type (const cha * the psymtab gets it wrong in some cases. */ block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + sym = lookup_block_symbol (block, name, STRUCT_DOMAIN); if (!sym) error (_("Internal: global symbol `%s' found in %s psymtab but not in symtab.\n\ %s may be an inlined function, or may be a template function\n\ @@ -1928,7 +1900,7 @@ basic_lookup_transparent_type (const cha { bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + sym = lookup_block_symbol (block, name, STRUCT_DOMAIN); if (sym && !TYPE_IS_OPAQUE (SYMBOL_TYPE (sym))) { return SYMBOL_TYPE (sym); @@ -1937,12 +1909,12 @@ basic_lookup_transparent_type (const cha ALL_PSYMTABS (objfile, ps) { - if (!ps->readin && lookup_partial_symbol (ps, name, NULL, 0, STRUCT_DOMAIN)) + if (!ps->readin && lookup_partial_symbol (ps, name, 0, STRUCT_DOMAIN)) { s = PSYMTAB_TO_SYMTAB (ps); bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + sym = lookup_block_symbol (block, name, STRUCT_DOMAIN); if (!sym) { /* This shouldn't be necessary, but as a last resort @@ -1951,7 +1923,7 @@ basic_lookup_transparent_type (const cha * the psymtab gets it wrong in some cases. */ block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); - sym = lookup_block_symbol (block, name, NULL, STRUCT_DOMAIN); + sym = lookup_block_symbol (block, name, STRUCT_DOMAIN); if (!sym) error (_("Internal: static symbol `%s' found in %s psymtab but not in symtab.\n\ %s may be an inlined function, or may be a template function\n\ @@ -1978,7 +1950,7 @@ find_main_psymtab (void) ALL_PSYMTABS (objfile, pst) { - if (lookup_partial_symbol (pst, main_name (), NULL, 1, VAR_DOMAIN)) + if (lookup_partial_symbol (pst, main_name (), 1, VAR_DOMAIN)) { return (pst); } @@ -1996,14 +1968,10 @@ find_main_psymtab (void) search on the symbols. Each symbol which is marked as being a ObjC/C++ symbol (language_cplus or language_objc set) has both the encoded and non-encoded names tested for a match. - - If LINKAGE_NAME is non-NULL, verify that any symbol we find has this - particular mangled name. */ struct symbol * lookup_block_symbol (const struct block *block, const char *name, - const char *linkage_name, const domain_enum domain) { struct dict_iterator iter; @@ -2016,9 +1984,7 @@ lookup_block_symbol (const struct block sym = dict_iter_name_next (name, &iter)) { if (symbol_matches_domain (SYMBOL_LANGUAGE (sym), - SYMBOL_DOMAIN (sym), domain) - && (linkage_name != NULL - ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + SYMBOL_DOMAIN (sym), domain)) return sym; } return NULL; @@ -2038,9 +2004,7 @@ lookup_block_symbol (const struct block sym = dict_iter_name_next (name, &iter)) { if (symbol_matches_domain (SYMBOL_LANGUAGE (sym), - SYMBOL_DOMAIN (sym), domain) - && (linkage_name != NULL - ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) + SYMBOL_DOMAIN (sym), domain)) { sym_found = sym; if (!SYMBOL_IS_ARGUMENT (sym)) Index: symtab.h =================================================================== RCS file: /cvs/src/src/gdb/symtab.h,v retrieving revision 1.146 diff -u -p -r1.146 symtab.h --- symtab.h 27 Jan 2010 00:15:59 -0000 1.146 +++ symtab.h 28 Jan 2010 23:15:50 -0000 @@ -172,9 +172,6 @@ extern CORE_ADDR symbol_overlayed_addres #define SYMBOL_SECTION(symbol) (symbol)->ginfo.section #define SYMBOL_OBJ_SECTION(symbol) (symbol)->ginfo.obj_section -#define SYMBOL_CPLUS_DEMANGLED_NAME(symbol) \ - (symbol)->ginfo.language_specific.cplus_specific.demangled_name - /* Initializes the language dependent portion of a symbol depending upon the language for the symbol. */ #define SYMBOL_INIT_LANGUAGE_SPECIFIC(symbol,language) \ @@ -994,7 +991,6 @@ extern struct symbol *lookup_symbol (con that can't think of anything better to do. */ extern struct symbol *basic_lookup_symbol_nonlocal (const char *, - const char *, const struct block *, const domain_enum); @@ -1005,7 +1001,6 @@ extern struct symbol *basic_lookup_symbo is one; do nothing if BLOCK is NULL or a global block. */ extern struct symbol *lookup_symbol_static (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain); @@ -1013,7 +1008,6 @@ extern struct symbol *lookup_symbol_stat necessary). */ extern struct symbol *lookup_symbol_global (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain); @@ -1022,21 +1016,18 @@ extern struct symbol *lookup_symbol_glob will fix up the symbol if necessary. */ extern struct symbol *lookup_symbol_aux_block (const char *name, - const char *linkage_name, const struct block *block, const domain_enum domain); /* Lookup a partial symbol. */ extern struct partial_symbol *lookup_partial_symbol (struct partial_symtab *, - const char *, const char *, int, domain_enum); /* lookup a symbol by name, within a specified block */ extern struct symbol *lookup_block_symbol (const struct block *, const char *, - const char *, const domain_enum); /* lookup a [struct, union, enum] by name, within a specified block */ @@ -1372,7 +1363,6 @@ extern /*const */ char *main_name (void) /* Check global symbols in objfile. */ struct symbol *lookup_global_symbol_from_objfile (const struct objfile *objfile, const char *name, - const char *linkage_name, const domain_enum domain); extern struct symtabs_and_lines Index: valops.c =================================================================== RCS file: /cvs/src/src/gdb/valops.c,v retrieving revision 1.233 diff -u -p -r1.233 valops.c --- valops.c 26 Jan 2010 16:47:34 -0000 1.233 +++ valops.c 28 Jan 2010 23:15:53 -0000 @@ -3096,7 +3122,7 @@ value_maybe_namespace_elt (const struct struct symbol *sym; struct value *result; - sym = cp_lookup_symbol_namespace (namespace_name, name, NULL, + sym = cp_lookup_symbol_namespace(namespace_name, name, get_selected_block (0), VAR_DOMAIN, 1); @@ -3240,7 +3266,7 @@ value_of_local (const char *name, int co /* Calling lookup_block_symbol is necessary to get the LOC_REGISTER symbol instead of the LOC_ARG one (if both exist). */ - sym = lookup_block_symbol (b, name, NULL, VAR_DOMAIN); + sym = lookup_block_symbol (b, name, VAR_DOMAIN); if (sym == NULL) { if (complain)