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/linespec.c | |
parent | 21b556f400421068d5d1928b65750a909c2f716e (diff) | |
download | gdb-2570f2b7e1242480dcf1db929ca99febce976ca0.zip gdb-2570f2b7e1242480dcf1db929ca99febce976ca0.tar.gz 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/linespec.c')
-rw-r--r-- | gdb/linespec.c | 51 |
1 files changed, 17 insertions, 34 deletions
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; } |