diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2008-05-19 15:50:10 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2008-05-19 15:50:10 +0000 |
commit | 2570f2b7e1242480dcf1db929ca99febce976ca0 (patch) | |
tree | fbe097c8ae7e5a68bbd43ecc21438202d8e46eb1 /gdb | |
parent | 21b556f400421068d5d1928b65750a909c2f716e (diff) | |
download | fsf-binutils-gdb-2570f2b7e1242480dcf1db929ca99febce976ca0.zip fsf-binutils-gdb-2570f2b7e1242480dcf1db929ca99febce976ca0.tar.gz fsf-binutils-gdb-2570f2b7e1242480dcf1db929ca99febce976ca0.tar.bz2 |
* symtab.h (lookup_symbol_in_language): Remove SYMTAB parameter.
(lookup_symbol): Likewise.
* symtab.c (lookup_symbol_in_language): Remove SYMTAB parameter.
(lookup_symbol): Likewise.
(search_symbols): Update.
* linespec.c (find_methods, collect_methods): Update.
(add_matching_methods, add_constructors): Update.
(decode_compound, decode_dollar, decode_variable): Update.
(lookup_prefix_sym): Update.
(symbol_found): Remove SYM_SYMTAB parameter.
Use SYMBOL_SYMTAB (sym) instead.
* gdbtypes.c (lookup_typename): Update.
(lookup_struct, lookup_union, lookup_enum): Update.
(lookup_template_type): Update.
(check_typedef): Update.
* language.c (lang_bool_type): Update.
* mdebugread.c (parse_procedure): Update.
* mi/mi-cmd-stack.c (list_args_or_locals): Update.
* parse.c (write_dollar_variable): Update.
* printcmd.c (address_info): Update.
* source.c (select_source_symtab): Update.
* stack.c (print_frame_args, print_frame_arg_vars): Update.
* valops.c (find_function_in_inferior): Update.
(value_struct_elt_for_reference): Update.
* value.c (value_static_field, value_fn_field): Update.
* alpha-mdebug-tdep.c (find_proc_desc): Update.
* arm-tdep.c (arm_skip_prologue): Update.
* mt-tdep.c (mt_skip_prologue): Update.
* xstormy16-tdep.c (xstormy16_skip_prologue): Update.
* ada-lang.h (struct ada_symbol_info): Remove SYMTAB member.
* ada-lang.c (ada_add_block_symbols): Remove SYMTAB parameter.
(add_defn_to_vec): Likewise.
(ada_add_block_symbols): Likewise.
(lookup_cached_symbol, cache_symbol): Likewise.
(standard_lookup): Update.
(ada_lookup_symbol_list): Update.
* c-valprint.c (c_val_print): Update.
* cp-support.c (cp_lookup_rtti_type): Update.
* jv-lang.c (java_lookup_class, get_java_object_type): Update.
* objc-lang.c (lookup_struct_typedef, find_imps): Update.
* p-valprint.c (pascal_val_print): Update.
* scm-lang.c (scm_lookup_name): Update.
* c-exp.y: Update.
* f-exp.y: Update.
* jv-exp.y: Update.
* m2-exp.y: Update.
* objc-exp.y: Update.
* p-exp.y: Update.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 58 | ||||
-rw-r--r-- | gdb/ada-lang.c | 57 | ||||
-rw-r--r-- | gdb/ada-lang.h | 3 | ||||
-rw-r--r-- | gdb/alpha-mdebug-tdep.c | 2 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 2 | ||||
-rw-r--r-- | gdb/c-exp.y | 12 | ||||
-rw-r--r-- | gdb/c-valprint.c | 2 | ||||
-rw-r--r-- | gdb/cp-support.c | 2 | ||||
-rw-r--r-- | gdb/f-exp.y | 3 | ||||
-rw-r--r-- | gdb/gdbtypes.c | 21 | ||||
-rw-r--r-- | gdb/jv-exp.y | 2 | ||||
-rw-r--r-- | gdb/jv-lang.c | 6 | ||||
-rw-r--r-- | gdb/language.c | 8 | ||||
-rw-r--r-- | gdb/linespec.c | 51 | ||||
-rw-r--r-- | gdb/m2-exp.y | 12 | ||||
-rw-r--r-- | gdb/mdebugread.c | 2 | ||||
-rw-r--r-- | gdb/mi/mi-cmd-stack.c | 3 | ||||
-rw-r--r-- | gdb/mt-tdep.c | 2 | ||||
-rw-r--r-- | gdb/objc-exp.y | 15 | ||||
-rw-r--r-- | gdb/objc-lang.c | 5 | ||||
-rw-r--r-- | gdb/p-exp.y | 27 | ||||
-rw-r--r-- | gdb/p-valprint.c | 2 | ||||
-rw-r--r-- | gdb/parse.c | 2 | ||||
-rw-r--r-- | gdb/printcmd.c | 2 | ||||
-rw-r--r-- | gdb/scm-lang.c | 6 | ||||
-rw-r--r-- | gdb/source.c | 2 | ||||
-rw-r--r-- | gdb/stack.c | 4 | ||||
-rw-r--r-- | gdb/symtab.c | 19 | ||||
-rw-r--r-- | gdb/symtab.h | 6 | ||||
-rw-r--r-- | gdb/valops.c | 6 | ||||
-rw-r--r-- | gdb/value.c | 4 | ||||
-rw-r--r-- | gdb/xstormy16-tdep.c | 2 |
32 files changed, 169 insertions, 181 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3f7e922..17962c8 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,63 @@ 2008-05-19 Ulrich Weigand <uweigand@de.ibm.com> + * symtab.h (lookup_symbol_in_language): Remove SYMTAB parameter. + (lookup_symbol): Likewise. + * symtab.c (lookup_symbol_in_language): Remove SYMTAB parameter. + (lookup_symbol): Likewise. + (search_symbols): Update. + + * linespec.c (find_methods, collect_methods): Update. + (add_matching_methods, add_constructors): Update. + (decode_compound, decode_dollar, decode_variable): Update. + (lookup_prefix_sym): Update. + + (symbol_found): Remove SYM_SYMTAB parameter. + Use SYMBOL_SYMTAB (sym) instead. + + * gdbtypes.c (lookup_typename): Update. + (lookup_struct, lookup_union, lookup_enum): Update. + (lookup_template_type): Update. + (check_typedef): Update. + * language.c (lang_bool_type): Update. + * mdebugread.c (parse_procedure): Update. + * mi/mi-cmd-stack.c (list_args_or_locals): Update. + * parse.c (write_dollar_variable): Update. + * printcmd.c (address_info): Update. + * source.c (select_source_symtab): Update. + * stack.c (print_frame_args, print_frame_arg_vars): Update. + * valops.c (find_function_in_inferior): Update. + (value_struct_elt_for_reference): Update. + * value.c (value_static_field, value_fn_field): Update. + + * alpha-mdebug-tdep.c (find_proc_desc): Update. + * arm-tdep.c (arm_skip_prologue): Update. + * mt-tdep.c (mt_skip_prologue): Update. + * xstormy16-tdep.c (xstormy16_skip_prologue): Update. + + * ada-lang.h (struct ada_symbol_info): Remove SYMTAB member. + * ada-lang.c (ada_add_block_symbols): Remove SYMTAB parameter. + (add_defn_to_vec): Likewise. + (ada_add_block_symbols): Likewise. + (lookup_cached_symbol, cache_symbol): Likewise. + (standard_lookup): Update. + (ada_lookup_symbol_list): Update. + + * c-valprint.c (c_val_print): Update. + * cp-support.c (cp_lookup_rtti_type): Update. + * jv-lang.c (java_lookup_class, get_java_object_type): Update. + * objc-lang.c (lookup_struct_typedef, find_imps): Update. + * p-valprint.c (pascal_val_print): Update. + * scm-lang.c (scm_lookup_name): Update. + + * c-exp.y: Update. + * f-exp.y: Update. + * jv-exp.y: Update. + * m2-exp.y: Update. + * objc-exp.y: Update. + * p-exp.y: Update. + +2008-05-19 Ulrich Weigand <uweigand@de.ibm.com> + * language.h (struct language_defn): Remove SYMTAB parameter from la_lookup_symbol_nonlocal callback function pointer. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index baeef0a..7060f50 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -115,13 +115,12 @@ static struct value *make_array_descriptor (struct type *, struct value *, static void ada_add_block_symbols (struct obstack *, struct block *, const char *, - domain_enum, struct objfile *, - struct symtab *, int); + domain_enum, struct objfile *, int); static int is_nonfunction (struct ada_symbol_info *, int); static void add_defn_to_vec (struct obstack *, struct symbol *, - struct block *, struct symtab *); + struct block *); static int num_defns_collected (struct obstack *); @@ -3976,15 +3975,14 @@ make_array_descriptor (struct type *type, struct value *arr, CORE_ADDR *sp) static int lookup_cached_symbol (const char *name, domain_enum namespace, - struct symbol **sym, struct block **block, - struct symtab **symtab) + struct symbol **sym, struct block **block) { return 0; } static void cache_symbol (const char *name, domain_enum namespace, struct symbol *sym, - struct block *block, struct symtab *symtab) + struct block *block) { } @@ -3998,13 +3996,11 @@ standard_lookup (const char *name, const struct block *block, domain_enum domain) { struct symbol *sym; - struct symtab *symtab; - if (lookup_cached_symbol (name, domain, &sym, NULL, NULL)) + if (lookup_cached_symbol (name, domain, &sym, NULL)) return sym; - sym = - lookup_symbol_in_language (name, block, domain, language_c, 0, &symtab); - cache_symbol (name, domain, sym, block_found, symtab); + sym = lookup_symbol_in_language (name, block, domain, language_c, 0); + cache_symbol (name, domain, sym, block_found); return sym; } @@ -4089,7 +4085,7 @@ lesseq_defined_than (struct symbol *sym0, struct symbol *sym1) static void add_defn_to_vec (struct obstack *obstackp, struct symbol *sym, - struct block *block, struct symtab *symtab) + struct block *block) { int i; size_t tmp; @@ -4112,7 +4108,6 @@ add_defn_to_vec (struct obstack *obstackp, { prevDefns[i].sym = sym; prevDefns[i].block = block; - prevDefns[i].symtab = symtab; return; } } @@ -4122,7 +4117,6 @@ add_defn_to_vec (struct obstack *obstackp, info.sym = sym; info.block = block; - info.symtab = symtab; obstack_grow (obstackp, &info, sizeof (struct ada_symbol_info)); } } @@ -4726,7 +4720,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0, { block_depth += 1; ada_add_block_symbols (&symbol_list_obstack, block, name, - namespace, NULL, NULL, wild_match); + namespace, NULL, wild_match); /* If we found a non-function match, assume that's the one. */ if (is_nonfunction (defns_collected (&symbol_list_obstack, 0), @@ -4748,10 +4742,10 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0, goto done; cacheIfUnique = 1; - if (lookup_cached_symbol (name0, namespace, &sym, &block, &s)) + if (lookup_cached_symbol (name0, namespace, &sym, &block)) { if (sym != NULL) - add_defn_to_vec (&symbol_list_obstack, sym, block, s); + add_defn_to_vec (&symbol_list_obstack, sym, block); goto done; } @@ -4764,7 +4758,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0, bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); ada_add_block_symbols (&symbol_list_obstack, block, name, namespace, - objfile, s, wild_match); + objfile, wild_match); } if (namespace == VAR_DOMAIN) @@ -4787,14 +4781,14 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0, block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); ada_add_block_symbols (&symbol_list_obstack, block, SYMBOL_LINKAGE_NAME (msymbol), - namespace, objfile, s, wild_match); + namespace, objfile, wild_match); if (num_defns_collected (&symbol_list_obstack) == ndefns0) { block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); ada_add_block_symbols (&symbol_list_obstack, block, SYMBOL_LINKAGE_NAME (msymbol), - namespace, objfile, s, + namespace, objfile, wild_match); } } @@ -4815,7 +4809,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0, bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK); ada_add_block_symbols (&symbol_list_obstack, block, name, - namespace, objfile, s, wild_match); + namespace, objfile, wild_match); } } @@ -4832,7 +4826,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0, bv = BLOCKVECTOR (s); block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); ada_add_block_symbols (&symbol_list_obstack, block, name, namespace, - objfile, s, wild_match); + objfile, wild_match); } ALL_PSYMTABS (objfile, ps) @@ -4847,7 +4841,7 @@ ada_lookup_symbol_list (const char *name0, const struct block *block0, continue; block = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); ada_add_block_symbols (&symbol_list_obstack, block, name, - namespace, objfile, s, wild_match); + namespace, objfile, wild_match); } } } @@ -4859,11 +4853,10 @@ done: ndefns = remove_extra_symbols (*results, ndefns); if (ndefns == 0) - cache_symbol (name0, namespace, NULL, NULL, NULL); + cache_symbol (name0, namespace, NULL, NULL); if (ndefns == 1 && cacheIfUnique) - cache_symbol (name0, namespace, (*results)[0].sym, (*results)[0].block, - (*results)[0].symtab); + cache_symbol (name0, namespace, (*results)[0].sym, (*results)[0].block); ndefns = remove_irrelevant_renamings (*results, ndefns, block0); @@ -5205,7 +5198,7 @@ static void ada_add_block_symbols (struct obstack *obstackp, struct block *block, const char *name, domain_enum domain, struct objfile *objfile, - struct symtab *symtab, int wild) + int wild) { struct dict_iterator iter; int name_len = strlen (name); @@ -5243,7 +5236,7 @@ ada_add_block_symbols (struct obstack *obstackp, found_sym = 1; add_defn_to_vec (obstackp, fixup_symbol_section (sym, objfile), - block, symtab); + block); break; } } @@ -5277,7 +5270,7 @@ ada_add_block_symbols (struct obstack *obstackp, found_sym = 1; add_defn_to_vec (obstackp, fixup_symbol_section (sym, objfile), - block, symtab); + block); break; } } @@ -5289,7 +5282,7 @@ ada_add_block_symbols (struct obstack *obstackp, { add_defn_to_vec (obstackp, fixup_symbol_section (arg_sym, objfile), - block, symtab); + block); } if (!wild) @@ -5333,7 +5326,7 @@ ada_add_block_symbols (struct obstack *obstackp, found_sym = 1; add_defn_to_vec (obstackp, fixup_symbol_section (sym, objfile), - block, symtab); + block); break; } } @@ -5346,7 +5339,7 @@ ada_add_block_symbols (struct obstack *obstackp, { add_defn_to_vec (obstackp, fixup_symbol_section (arg_sym, objfile), - block, symtab); + block); } } } diff --git a/gdb/ada-lang.h b/gdb/ada-lang.h index 5611573..2d13603 100644 --- a/gdb/ada-lang.h +++ b/gdb/ada-lang.h @@ -165,12 +165,11 @@ enum ada_operator OP_ADA_LAST }; -/* A triple, (symbol, block, symtab), representing one instance of a +/* A tuple, (symbol, block), representing one instance of a * symbol-lookup operation. */ struct ada_symbol_info { struct symbol* sym; struct block* block; - struct symtab* symtab; }; /* Denotes a type of renaming symbol (see ada_parse_renaming). */ diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c index b63bb76..98ae245 100644 --- a/gdb/alpha-mdebug-tdep.c +++ b/gdb/alpha-mdebug-tdep.c @@ -109,7 +109,7 @@ find_proc_desc (CORE_ADDR pc) symbol reading. */ sym = NULL; else - sym = lookup_symbol (MDEBUG_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0, NULL); + sym = lookup_symbol (MDEBUG_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0); } if (sym) diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index c4824db..fd732a8 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -534,7 +534,7 @@ arm_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) struct symbol *sym; /* Found a function. */ - sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL, NULL); + sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL); if (sym && SYMBOL_LANGUAGE (sym) != language_asm) { /* Don't use this trick for assembly source files. */ diff --git a/gdb/c-exp.y b/gdb/c-exp.y index b520721..3729633 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -583,8 +583,7 @@ block : BLOCKNAME block : block COLONCOLON name { struct symbol *tem = lookup_symbol (copy_name ($3), $1, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) error ("No function \"%s\" in specified context.", copy_name ($3)); @@ -594,8 +593,7 @@ block : block COLONCOLON name variable: block COLONCOLON name { struct symbol *sym; sym = lookup_symbol (copy_name ($3), $1, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (sym == 0) error ("No symbol \"%s\" in specified context.", copy_name ($3)); @@ -655,8 +653,7 @@ variable: qualified_name sym = lookup_symbol (name, (const struct block *) NULL, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (sym) { write_exp_elt_opcode (OP_VAR_VALUE); @@ -1754,8 +1751,7 @@ yylex () sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, current_language->la_language == language_cplus - ? &is_a_field_of_this : (int *) NULL, - (struct symtab **) NULL); + ? &is_a_field_of_this : (int *) NULL); /* Call lookup_symtab, not lookup_partial_symtab, in case there are no psymtabs (coff, xcoff, or some future change to blow away the psymtabs once once symbols are read). */ diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 23f097a..cf35e88 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -262,7 +262,7 @@ c_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, if (msymbol != NULL) wsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (msymbol), block, - VAR_DOMAIN, &is_this_fld, NULL); + VAR_DOMAIN, &is_this_fld); if (wsym) { diff --git a/gdb/cp-support.c b/gdb/cp-support.c index 3fefb3c..e478f42 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -841,7 +841,7 @@ cp_lookup_rtti_type (const char *name, struct block *block) struct symbol * rtti_sym; struct type * rtti_type; - rtti_sym = lookup_symbol (name, block, STRUCT_DOMAIN, NULL, NULL); + rtti_sym = lookup_symbol (name, block, STRUCT_DOMAIN, NULL); if (rtti_sym == NULL) { diff --git a/gdb/f-exp.y b/gdb/f-exp.y index 6a422b5..121b247 100644 --- a/gdb/f-exp.y +++ b/gdb/f-exp.y @@ -1175,8 +1175,7 @@ yylex () sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, current_language->la_language == language_cplus - ? &is_a_field_of_this : NULL, - NULL); + ? &is_a_field_of_this : NULL); if (sym && SYMBOL_CLASS (sym) == LOC_TYPEDEF) { yylval.tsym.type = SYMBOL_TYPE (sym); diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c index f444153..939a1dc 100644 --- a/gdb/gdbtypes.c +++ b/gdb/gdbtypes.c @@ -1045,8 +1045,7 @@ lookup_typename (char *name, struct block *block, int noerr) struct symbol *sym; struct type *tmp; - sym = lookup_symbol (name, block, VAR_DOMAIN, 0, - (struct symtab **) NULL); + sym = lookup_symbol (name, block, VAR_DOMAIN, 0); if (sym == NULL || SYMBOL_CLASS (sym) != LOC_TYPEDEF) { tmp = language_lookup_primitive_type_by_name (current_language, @@ -1101,8 +1100,7 @@ lookup_struct (char *name, struct block *block) { struct symbol *sym; - sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0, - (struct symtab **) NULL); + sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0); if (sym == NULL) { @@ -1125,8 +1123,7 @@ lookup_union (char *name, struct block *block) struct symbol *sym; struct type *t; - sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0, - (struct symtab **) NULL); + sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0); if (sym == NULL) error (_("No union type named %s."), name); @@ -1157,8 +1154,7 @@ lookup_enum (char *name, struct block *block) { struct symbol *sym; - sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0, - (struct symtab **) NULL); + sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0); if (sym == NULL) { error (_("No enum type named %s."), name); @@ -1186,8 +1182,7 @@ lookup_template_type (char *name, struct type *type, strcat (nam, TYPE_NAME (type)); strcat (nam, " >"); /* FIXME, extra space still introduced in gcc? */ - sym = lookup_symbol (nam, block, VAR_DOMAIN, 0, - (struct symtab **) NULL); + sym = lookup_symbol (nam, block, VAR_DOMAIN, 0); if (sym == NULL) { @@ -1425,8 +1420,7 @@ check_typedef (struct type *type) stub_noname_complaint (); return type; } - sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0, - (struct symtab **) NULL); + sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0); if (sym) TYPE_TARGET_TYPE (type) = SYMBOL_TYPE (sym); else /* TYPE_CODE_UNDEF */ @@ -1490,8 +1484,7 @@ check_typedef (struct type *type) stub_noname_complaint (); return type; } - sym = lookup_symbol (name, 0, STRUCT_DOMAIN, - 0, (struct symtab **) NULL); + sym = lookup_symbol (name, 0, STRUCT_DOMAIN, 0); if (sym) { /* Same as above for opaque types, we can replace the stub diff --git a/gdb/jv-exp.y b/gdb/jv-exp.y index 9387fa7..33cbdf9 100644 --- a/gdb/jv-exp.y +++ b/gdb/jv-exp.y @@ -1229,7 +1229,7 @@ push_variable (struct stoken name) int is_a_field_of_this = 0; struct symbol *sym; sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, - &is_a_field_of_this, (struct symtab **) NULL); + &is_a_field_of_this); if (sym && SYMBOL_CLASS (sym) != LOC_TYPEDEF) { if (symbol_read_needs_frame (sym)) diff --git a/gdb/jv-lang.c b/gdb/jv-lang.c index b72b90c..6080839 100644 --- a/gdb/jv-lang.c +++ b/gdb/jv-lang.c @@ -169,8 +169,7 @@ struct type * java_lookup_class (char *name) { struct symbol *sym; - sym = lookup_symbol (name, expression_context_block, STRUCT_DOMAIN, - (int *) 0, (struct symtab **) NULL); + sym = lookup_symbol (name, expression_context_block, STRUCT_DOMAIN, NULL); if (sym != NULL) return SYMBOL_TYPE (sym); #if 0 @@ -577,8 +576,7 @@ get_java_object_type (void) if (java_object_type == NULL) { struct symbol *sym; - sym = lookup_symbol ("java.lang.Object", NULL, STRUCT_DOMAIN, - (int *) 0, (struct symtab **) NULL); + sym = lookup_symbol ("java.lang.Object", NULL, STRUCT_DOMAIN, NULL); if (sym == NULL) error (_("cannot find java.lang.Object")); java_object_type = SYMBOL_TYPE (sym); diff --git a/gdb/language.c b/gdb/language.c index 80f6961..66e5542 100644 --- a/gdb/language.c +++ b/gdb/language.c @@ -795,7 +795,7 @@ lang_bool_type (void) switch (current_language->la_language) { case language_fortran: - sym = lookup_symbol ("logical", NULL, VAR_DOMAIN, NULL, NULL); + sym = lookup_symbol ("logical", NULL, VAR_DOMAIN, NULL); if (sym) { type = SYMBOL_TYPE (sym); @@ -807,9 +807,9 @@ lang_bool_type (void) case language_pascal: case language_ada: if (current_language->la_language==language_cplus) - {sym = lookup_symbol ("bool", NULL, VAR_DOMAIN, NULL, NULL);} + {sym = lookup_symbol ("bool", NULL, VAR_DOMAIN, NULL);} else - {sym = lookup_symbol ("boolean", NULL, VAR_DOMAIN, NULL, NULL);} + {sym = lookup_symbol ("boolean", NULL, VAR_DOMAIN, NULL);} if (sym) { type = SYMBOL_TYPE (sym); @@ -818,7 +818,7 @@ lang_bool_type (void) } return builtin_type_bool; case language_java: - sym = lookup_symbol ("boolean", NULL, VAR_DOMAIN, NULL, NULL); + sym = lookup_symbol ("boolean", NULL, VAR_DOMAIN, NULL); if (sym) { type = SYMBOL_TYPE (sym); diff --git a/gdb/linespec.c b/gdb/linespec.c index 106cb88..6386834 100644 --- a/gdb/linespec.c +++ b/gdb/linespec.c @@ -136,8 +136,7 @@ symtabs_and_lines symbol_found (int funfirstline, char ***canonical, char *copy, struct symbol *sym, - struct symtab *file_symtab, - struct symtab *sym_symtab); + struct symtab *file_symtab); static struct symtabs_and_lines minsym_found (int funfirstline, @@ -214,8 +213,7 @@ find_methods (struct type *t, char *name, enum language language, the class, then the loop can't do any good. */ if (class_name && (lookup_symbol_in_language (class_name, (struct block *) NULL, - STRUCT_DOMAIN, language, (int *) NULL, - (struct symtab **) NULL))) + STRUCT_DOMAIN, language, (int *) NULL))) { int method_counter; int name_len = strlen (name); @@ -316,8 +314,7 @@ add_matching_methods (int method_counter, struct type *t, sym_arr[i1] = lookup_symbol_in_language (phys_name, NULL, VAR_DOMAIN, language, - (int *) NULL, - (struct symtab **) NULL); + (int *) NULL); if (sym_arr[i1]) i1++; else @@ -374,8 +371,7 @@ add_constructors (int method_counter, struct type *t, sym_arr[i1] = lookup_symbol_in_language (phys_name, NULL, VAR_DOMAIN, language, - (int *) NULL, - (struct symtab **) NULL); + (int *) NULL); if (sym_arr[i1]) i1++; } @@ -800,12 +796,11 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab, copy = (char *) alloca (p - *argptr + 1); memcpy (copy, *argptr, p - *argptr); copy[p - *argptr] = '\000'; - sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0, &sym_symtab); + sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0); if (sym) { *argptr = (*p == '\'') ? p + 1 : p; - return symbol_found (funfirstline, canonical, copy, sym, - NULL, sym_symtab); + return symbol_found (funfirstline, canonical, copy, sym, NULL); } /* Otherwise fall out from here and go to file/line spec processing, etc. */ @@ -1199,8 +1194,6 @@ decode_compound (char **argptr, int funfirstline, char ***canonical, char *saved_arg2 = *argptr; char *temp_end; struct symbol *sym; - /* The symtab that SYM was found in. */ - struct symtab *sym_symtab; char *copy; struct symbol *sym_class; struct symbol **sym_arr; @@ -1378,10 +1371,9 @@ decode_compound (char **argptr, int funfirstline, char ***canonical, *argptr = (*p == '\'') ? p + 1 : p; /* Look up entire name */ - sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0, &sym_symtab); + sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0); if (sym) - return symbol_found (funfirstline, canonical, copy, sym, - NULL, sym_symtab); + return symbol_found (funfirstline, canonical, copy, sym, NULL); /* Couldn't find any interpretation as classes/namespaces, so give up. The quotes are important if copy is empty. */ @@ -1422,8 +1414,7 @@ lookup_prefix_sym (char **argptr, char *p) /* At this point p1->"::inA::fun", p->"inA::fun" copy->"AAA", argptr->"inA::fun" */ - return lookup_symbol (copy, 0, STRUCT_DOMAIN, 0, - (struct symtab **) NULL); + return lookup_symbol (copy, 0, STRUCT_DOMAIN, 0); } /* This finds the method COPY in the class whose type is T and whose @@ -1513,8 +1504,7 @@ collect_methods (char *copy, struct type *t, sym_arr[i1] = lookup_symbol (TYPE_FN_FIELD_PHYSNAME (f, f_index), - NULL, VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + NULL, VAR_DOMAIN, (int *) NULL); if (sym_arr[i1]) i1++; } @@ -1677,8 +1667,6 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab, struct symtab_and_line val; char *p; struct symbol *sym; - /* The symtab that SYM was found in. */ - struct symtab *sym_symtab; struct minimal_symbol *msymbol; p = (copy[1] == '$') ? copy + 2 : copy + 1; @@ -1698,13 +1686,12 @@ decode_dollar (char *copy, int funfirstline, struct symtab *default_symtab, convenience variable. */ /* Look up entire name as a symbol first. */ - sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0, &sym_symtab); + sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0); file_symtab = (struct symtab *) NULL; need_canonical = 1; /* Symbol was found --> jump to normal symbol processing. */ if (sym) - return symbol_found (funfirstline, canonical, copy, sym, - NULL, sym_symtab); + return symbol_found (funfirstline, canonical, copy, sym, NULL); /* If symbol was not found, look in minimal symbol tables. */ msymbol = lookup_minimal_symbol (copy, NULL, NULL); @@ -1747,8 +1734,6 @@ decode_variable (char *copy, int funfirstline, char ***canonical, struct symtab *file_symtab, int *not_found_ptr) { struct symbol *sym; - /* The symtab that SYM was found in. */ - struct symtab *sym_symtab; struct minimal_symbol *msymbol; @@ -1757,11 +1742,10 @@ decode_variable (char *copy, int funfirstline, char ***canonical, ? BLOCKVECTOR_BLOCK (BLOCKVECTOR (file_symtab), STATIC_BLOCK) : get_selected_block (0)), - VAR_DOMAIN, 0, &sym_symtab); + VAR_DOMAIN, 0); if (sym != NULL) - return symbol_found (funfirstline, canonical, copy, sym, - file_symtab, sym_symtab); + return symbol_found (funfirstline, canonical, copy, sym, file_symtab); msymbol = lookup_minimal_symbol (copy, NULL, NULL); @@ -1788,8 +1772,7 @@ decode_variable (char *copy, int funfirstline, char ***canonical, static struct symtabs_and_lines symbol_found (int funfirstline, char ***canonical, char *copy, - struct symbol *sym, struct symtab *file_symtab, - struct symtab *sym_symtab) + struct symbol *sym, struct symtab *file_symtab) { struct symtabs_and_lines values; @@ -1809,7 +1792,7 @@ symbol_found (int funfirstline, char ***canonical, char *copy, function. */ if (file_symtab == 0) { - struct blockvector *bv = BLOCKVECTOR (sym_symtab); + struct blockvector *bv = BLOCKVECTOR (SYMBOL_SYMTAB (sym)); struct block *b = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); if (lookup_block_symbol (b, copy, NULL, VAR_DOMAIN) != NULL) build_canonical_line_spec (values.sals, copy, canonical); @@ -1827,7 +1810,7 @@ symbol_found (int funfirstline, char ***canonical, char *copy, xmalloc (sizeof (struct symtab_and_line)); values.nelts = 1; memset (&values.sals[0], 0, sizeof (values.sals[0])); - values.sals[0].symtab = sym_symtab; + values.sals[0].symtab = SYMBOL_SYMTAB (sym); values.sals[0].line = SYMBOL_LINE (sym); return values; } diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index 143252f..c5ee4a4 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -550,7 +550,7 @@ block : fblock fblock : BLOCKNAME { struct symbol *sym = lookup_symbol (copy_name ($1), expression_context_block, - VAR_DOMAIN, 0, NULL); + VAR_DOMAIN, 0); $$ = sym;} ; @@ -559,7 +559,7 @@ fblock : BLOCKNAME fblock : block COLONCOLON BLOCKNAME { struct symbol *tem = lookup_symbol (copy_name ($3), $1, - VAR_DOMAIN, 0, NULL); + VAR_DOMAIN, 0); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) error ("No function \"%s\" in specified context.", copy_name ($3)); @@ -583,7 +583,7 @@ variable: INTERNAL_VAR variable: block COLONCOLON NAME { struct symbol *sym; sym = lookup_symbol (copy_name ($3), $1, - VAR_DOMAIN, 0, NULL); + VAR_DOMAIN, 0); if (sym == 0) error ("No symbol \"%s\" in specified context.", copy_name ($3)); @@ -603,8 +603,7 @@ variable: NAME sym = lookup_symbol (copy_name ($1), expression_context_block, VAR_DOMAIN, - &is_a_field_of_this, - NULL); + &is_a_field_of_this); if (sym) { if (symbol_read_needs_frame (sym)) @@ -1028,8 +1027,7 @@ yylex () if (lookup_partial_symtab (tmp)) return BLOCKNAME; - sym = lookup_symbol (tmp, expression_context_block, - VAR_DOMAIN, 0, NULL); + sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, 0); if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK) return BLOCKNAME; if (lookup_typename (copy_name (yylval.sval), expression_context_block, 1)) diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index 771f5fd..c997ccd 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -1880,7 +1880,7 @@ parse_procedure (PDR *pr, struct symtab *search_symtab, the same name exists, lookup_symbol will eventually read in the symtab for the global function and clobber cur_fdr. */ FDR *save_cur_fdr = cur_fdr; - s = lookup_symbol (sh_name, NULL, VAR_DOMAIN, 0, NULL); + s = lookup_symbol (sh_name, NULL, VAR_DOMAIN, 0); cur_fdr = save_cur_fdr; #else s = mylookup_symbol diff --git a/gdb/mi/mi-cmd-stack.c b/gdb/mi/mi-cmd-stack.c index 4d38867..af3818e 100644 --- a/gdb/mi/mi-cmd-stack.c +++ b/gdb/mi/mi-cmd-stack.c @@ -283,8 +283,7 @@ list_args_or_locals (int locals, int values, struct frame_info *fi) if (!locals) sym2 = lookup_symbol (SYMBOL_NATURAL_NAME (sym), block, VAR_DOMAIN, - (int *) NULL, - (struct symtab **) NULL); + (int *) NULL); else sym2 = sym; switch (values) diff --git a/gdb/mt-tdep.c b/gdb/mt-tdep.c index b3049dc..47246fb 100644 --- a/gdb/mt-tdep.c +++ b/gdb/mt-tdep.c @@ -411,7 +411,7 @@ mt_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) struct symbol *sym; /* Found a function. */ - sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL, NULL); + sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL); if (sym && SYMBOL_LANGUAGE (sym) != language_asm) { /* Don't use this trick for assembly source files. */ diff --git a/gdb/objc-exp.y b/gdb/objc-exp.y index f44cf6d..367b535 100644 --- a/gdb/objc-exp.y +++ b/gdb/objc-exp.y @@ -634,8 +634,7 @@ block : BLOCKNAME block : block COLONCOLON name { struct symbol *tem = lookup_symbol (copy_name ($3), $1, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) error ("No function \"%s\" in specified context.", copy_name ($3)); @@ -645,8 +644,7 @@ block : block COLONCOLON name variable: block COLONCOLON name { struct symbol *sym; sym = lookup_symbol (copy_name ($3), $1, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (sym == 0) error ("No symbol \"%s\" in specified context.", copy_name ($3)); @@ -705,8 +703,7 @@ variable: qualified_name sym = lookup_symbol (name, (const struct block *) NULL, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (sym) { write_exp_elt_opcode (OP_VAR_VALUE); @@ -1643,8 +1640,7 @@ yylex () sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, - need_this, - (struct symtab **) NULL); + need_this); /* Call lookup_symtab, not lookup_partial_symtab, in case there are no psymtabs (coff, xcoff, or some future change to blow away the psymtabs once symbols are read). */ @@ -1721,8 +1717,7 @@ yylex () tmp1[p - namestart] = '\0'; cur_sym = lookup_symbol (ncopy, expression_context_block, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (cur_sym) { if (SYMBOL_CLASS (cur_sym) == LOC_TYPEDEF) diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c index 08a6bb8..56871e3 100644 --- a/gdb/objc-lang.c +++ b/gdb/objc-lang.c @@ -85,8 +85,7 @@ lookup_struct_typedef (char *name, struct block *block, int noerr) { struct symbol *sym; - sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0, - (struct symtab **) NULL); + sym = lookup_symbol (name, block, STRUCT_DOMAIN, 0); if (sym == NULL) { @@ -1272,7 +1271,7 @@ char *find_imps (struct symtab *symtab, struct block *block, if (tmp == NULL) return NULL; - sym = lookup_symbol (selector, block, VAR_DOMAIN, 0, NULL); + sym = lookup_symbol (selector, block, VAR_DOMAIN, 0); if (sym != NULL) { if (syms) diff --git a/gdb/p-exp.y b/gdb/p-exp.y index 97ce0f7..95ccdf1 100644 --- a/gdb/p-exp.y +++ b/gdb/p-exp.y @@ -596,8 +596,7 @@ block : BLOCKNAME block : block COLONCOLON name { struct symbol *tem = lookup_symbol (copy_name ($3), $1, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (!tem || SYMBOL_CLASS (tem) != LOC_BLOCK) error ("No function \"%s\" in specified context.", copy_name ($3)); @@ -607,8 +606,7 @@ block : block COLONCOLON name variable: block COLONCOLON name { struct symbol *sym; sym = lookup_symbol (copy_name ($3), $1, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (sym == 0) error ("No symbol \"%s\" in specified context.", copy_name ($3)); @@ -644,8 +642,7 @@ variable: qualified_name sym = lookup_symbol (name, (const struct block *) NULL, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (sym) { write_exp_elt_opcode (OP_VAR_VALUE); @@ -1435,8 +1432,7 @@ yylex () static const char this_name[] = "this"; if (lookup_symbol (this_name, expression_context_block, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL)) + VAR_DOMAIN, (int *) NULL)) { free (uptokstart); return THIS; @@ -1480,9 +1476,7 @@ yylex () sym = NULL; else sym = lookup_symbol (tmp, expression_context_block, - VAR_DOMAIN, - &is_a_field_of_this, - (struct symtab **) NULL); + VAR_DOMAIN, &is_a_field_of_this); /* second chance uppercased (as Free Pascal does). */ if (!sym && !is_a_field_of_this && !is_a_field) { @@ -1497,9 +1491,7 @@ yylex () sym = NULL; else sym = lookup_symbol (tmp, expression_context_block, - VAR_DOMAIN, - &is_a_field_of_this, - (struct symtab **) NULL); + VAR_DOMAIN, &is_a_field_of_this); if (sym || is_a_field_of_this || is_a_field) for (i = 0; i <= namelen; i++) { @@ -1527,9 +1519,7 @@ yylex () sym = NULL; else sym = lookup_symbol (tmp, expression_context_block, - VAR_DOMAIN, - &is_a_field_of_this, - (struct symtab **) NULL); + VAR_DOMAIN, &is_a_field_of_this); if (sym || is_a_field_of_this || is_a_field) for (i = 0; i <= namelen; i++) { @@ -1626,8 +1616,7 @@ yylex () memcpy (tmp1, namestart, p - namestart); tmp1[p - namestart] = '\0'; cur_sym = lookup_symbol (ncopy, expression_context_block, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (cur_sym) { if (SYMBOL_CLASS (cur_sym) == LOC_TYPEDEF) diff --git a/gdb/p-valprint.c b/gdb/p-valprint.c index fa0ec6c..23a04da 100644 --- a/gdb/p-valprint.c +++ b/gdb/p-valprint.c @@ -219,7 +219,7 @@ pascal_val_print (struct type *type, const gdb_byte *valaddr, if (msymbol != NULL) wsym = lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), block, - VAR_DOMAIN, &is_this_fld, NULL); + VAR_DOMAIN, &is_this_fld); if (wsym) { diff --git a/gdb/parse.c b/gdb/parse.c index 9c0edf5..09ceaa9 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -543,7 +543,7 @@ write_dollar_variable (struct stoken str) have names beginning with $ or $$. Check for those, first. */ sym = lookup_symbol (copy_name (str), (struct block *) NULL, - VAR_DOMAIN, (int *) NULL, (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (sym) { write_exp_elt_opcode (OP_VAR_VALUE); diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 8a0db8d..44fb2e1 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1051,7 +1051,7 @@ address_info (char *exp, int from_tty) error (_("Argument required.")); sym = lookup_symbol (exp, get_selected_block (0), VAR_DOMAIN, - &is_a_field_of_this, (struct symtab **) NULL); + &is_a_field_of_this); if (sym == NULL) { if (is_a_field_of_this) diff --git a/gdb/scm-lang.c b/gdb/scm-lang.c index 0692d438..991e4b4 100644 --- a/gdb/scm-lang.c +++ b/gdb/scm-lang.c @@ -159,8 +159,7 @@ scm_lookup_name (char *str) if (in_eval_c () && (sym = lookup_symbol ("env", expression_context_block, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL)) != NULL) + VAR_DOMAIN, (int *) NULL)) != NULL) args[2] = value_of_variable (sym, expression_context_block); else /* FIXME in this case, we should try lookup_symbol first */ @@ -173,8 +172,7 @@ scm_lookup_name (char *str) sym = lookup_symbol (str, expression_context_block, - VAR_DOMAIN, (int *) NULL, - (struct symtab **) NULL); + VAR_DOMAIN, (int *) NULL); if (sym) return value_of_variable (sym, NULL); error (_("No symbol \"%s\" in current context."), str); diff --git a/gdb/source.c b/gdb/source.c index 03ecbd7..fc5fe0b 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -239,7 +239,7 @@ select_source_symtab (struct symtab *s) /* Make the default place to list be the function `main' if one exists. */ - if (lookup_symbol (main_name (), 0, VAR_DOMAIN, 0, NULL)) + if (lookup_symbol (main_name (), 0, VAR_DOMAIN, 0)) { sals = decode_line_spec (main_name (), 1); sal = sals.sals[0]; diff --git a/gdb/stack.c b/gdb/stack.c index 47df396..a0c1edf 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -291,7 +291,7 @@ print_frame_args (struct symbol *func, struct frame_info *frame, { struct symbol *nsym; nsym = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), - b, VAR_DOMAIN, NULL, NULL); + b, VAR_DOMAIN, NULL); gdb_assert (nsym != NULL); if (SYMBOL_CLASS (nsym) == LOC_REGISTER) { @@ -1599,7 +1599,7 @@ print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream) are not combined in symbol-reading. */ sym2 = lookup_symbol (DEPRECATED_SYMBOL_NAME (sym), - b, VAR_DOMAIN, NULL, NULL); + b, VAR_DOMAIN, NULL); print_variable_value (sym2, frame, stream); fprintf_filtered (stream, "\n"); break; diff --git a/gdb/symtab.c b/gdb/symtab.c index db0808b..4f19d13 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1190,8 +1190,7 @@ fixup_psymbol_section (struct partial_symbol *psym, struct objfile *objfile) struct symbol * lookup_symbol_in_language (const char *name, const struct block *block, const domain_enum domain, enum language lang, - int *is_a_field_of_this, - struct symtab **symtab) + int *is_a_field_of_this) { char *demangled_name = NULL; const char *modified_name = NULL; @@ -1243,10 +1242,6 @@ lookup_symbol_in_language (const char *name, const struct block *block, if (needtofreename) xfree (demangled_name); - /* Override the returned symtab with the symbol's specific one. */ - if (returnval != NULL && symtab != NULL) - *symtab = SYMBOL_SYMTAB (returnval); - return returnval; } @@ -1255,12 +1250,11 @@ lookup_symbol_in_language (const char *name, const struct block *block, struct symbol * lookup_symbol (const char *name, const struct block *block, - domain_enum domain, int *is_a_field_of_this, - struct symtab **symtab) + domain_enum domain, int *is_a_field_of_this) { return lookup_symbol_in_language (name, block, domain, current_language->la_language, - is_a_field_of_this, symtab); + is_a_field_of_this); } /* Behave like lookup_symbol except that NAME is the natural name @@ -3172,8 +3166,7 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[], if (kind == FUNCTIONS_DOMAIN || lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), (struct block *) NULL, - VAR_DOMAIN, - 0, (struct symtab **) NULL) + VAR_DOMAIN, 0) == NULL) found_misc = 1; } @@ -3259,8 +3252,8 @@ search_symbols (char *regexp, domain_enum kind, int nfiles, char *files[], { /* Variables/Absolutes: Look up by name */ if (lookup_symbol (SYMBOL_LINKAGE_NAME (msymbol), - (struct block *) NULL, VAR_DOMAIN, - 0, (struct symtab **) NULL) == NULL) + (struct block *) NULL, VAR_DOMAIN, 0) + == NULL) { /* match */ psr = (struct symbol_search *) xmalloc (sizeof (struct symbol_search)); diff --git a/gdb/symtab.h b/gdb/symtab.h index 0a970df..92ea518 100644 --- a/gdb/symtab.h +++ b/gdb/symtab.h @@ -1012,15 +1012,13 @@ extern struct symbol *lookup_symbol_in_language (const char *, const struct block *, const domain_enum, enum language, - int *, - struct symtab **); + int *); /* lookup a symbol by name (optional block, optional symtab) in the current language */ extern struct symbol *lookup_symbol (const char *, const struct block *, - const domain_enum, int *, - struct symtab **); + const domain_enum, int *); /* A default version of lookup_symbol_nonlocal for use by languages that can't think of anything better to do. */ diff --git a/gdb/valops.c b/gdb/valops.c index 0d1bcc5..3ddee90 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -127,7 +127,7 @@ struct value * find_function_in_inferior (const char *name) { struct symbol *sym; - sym = lookup_symbol (name, 0, VAR_DOMAIN, 0, NULL); + sym = lookup_symbol (name, 0, VAR_DOMAIN, 0); if (sym != NULL) { if (SYMBOL_CLASS (sym) != LOC_BLOCK) @@ -2597,7 +2597,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, { struct symbol *s = lookup_symbol (TYPE_FN_FIELD_PHYSNAME (f, j), - 0, VAR_DOMAIN, 0, NULL); + 0, VAR_DOMAIN, 0); if (s == NULL) return NULL; @@ -2626,7 +2626,7 @@ value_struct_elt_for_reference (struct type *domain, int offset, { struct symbol *s = lookup_symbol (TYPE_FN_FIELD_PHYSNAME (f, j), - 0, VAR_DOMAIN, 0, NULL); + 0, VAR_DOMAIN, 0); if (s == NULL) return NULL; diff --git a/gdb/value.c b/gdb/value.c index e5a9a62..71ddf5c 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -1244,7 +1244,7 @@ value_static_field (struct type *type, int fieldno) else { char *phys_name = TYPE_FIELD_STATIC_PHYSNAME (type, fieldno); - struct symbol *sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0, NULL); + struct symbol *sym = lookup_symbol (phys_name, 0, VAR_DOMAIN, 0); if (sym == NULL) { /* With some compilers, e.g. HP aCC, static data members are reported @@ -1414,7 +1414,7 @@ value_fn_field (struct value **arg1p, struct fn_field *f, int j, struct type *ty struct symbol *sym; struct minimal_symbol *msym; - sym = lookup_symbol (physname, 0, VAR_DOMAIN, 0, NULL); + sym = lookup_symbol (physname, 0, VAR_DOMAIN, 0); if (sym != NULL) { msym = NULL; diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c index d21e15d..adc2f21 100644 --- a/gdb/xstormy16-tdep.c +++ b/gdb/xstormy16-tdep.c @@ -424,7 +424,7 @@ xstormy16_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc) return plg_end; /* Found a function. */ - sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL, NULL); + sym = lookup_symbol (func_name, NULL, VAR_DOMAIN, NULL); /* Don't use line number debug info for assembly source files. */ if (sym && SYMBOL_LANGUAGE (sym) != language_asm) { |