aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lang.c
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-05-19 15:49:14 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-05-19 15:49:14 +0000
commit21b556f400421068d5d1928b65750a909c2f716e (patch)
tree451d7a663dad6936ad29449000aff2b6b6d030c1 /gdb/ada-lang.c
parent6ffd79000b45e77b3625143932ffbf781b6aecab (diff)
downloadgdb-21b556f400421068d5d1928b65750a909c2f716e.zip
gdb-21b556f400421068d5d1928b65750a909c2f716e.tar.gz
gdb-21b556f400421068d5d1928b65750a909c2f716e.tar.bz2
* language.h (struct language_defn): Remove SYMTAB parameter from
la_lookup_symbol_nonlocal callback function pointer. * ada-lang.h (ada_lookup_encoded_symbol): Remove SYMTAB parameter. (ada_lookup_encoded_symbol): Likewise. * ada-lang.c (ada_lookup_encoded_symbol): Remove SYMTAB parameter. Always call fixup_symbol_section. (ada_lookup_symbol): Remove SYMTAB parameter. (ada_lookup_symbol_nonlocal): Likewise. * ada-exp.y (write_object_renaming): Update. (find_primitive_type): Likewise. * cp-support.h (cp_lookup_symbol_nonlocal): Remove SYMTAB parameter. (cp_lookup_symbol_namespace): Likewise. * cp-namespace.c (lookup_namespace_scope): Remove SYMTAB parameter. (lookup_symbol_file): Likewise. (lookup_possible_namespace_symbol): Likewise. (cp_lookup_symbol_nonlocal): Likewise. (cp_lookup_symbol_namespace): Likewise. (cp_lookup_nested_type): Update. * scm-valprint.c (scm_inferior_print): Update. * valops.c (value_maybe_namespace_elt): Update. * solist.h (struct target_so_ops): Remove SYMTAB parameter from lookup_lib_global_symbol callback function pointer. (solib_global_lookup): Remove SYMTAB parameter. * solib.c (solib_global_lookup): Remove SYMTAB parameter. * solib-svr4.c (elf_lookup_lib_symbol): Likewise. * symtab.h (basic_lookup_symbol_nonlocal): Remove SYMTAB parameter. (lookup_symbol_static): Likewise. (lookup_symbol_global): Likewise. (lookup_symbol_aux_block): Likewise. (lookup_global_symbol_from_objfile): Likewise. * symtab.c (lookup_symbol_aux): Remove SYMTAB parameter. (lookup_symbol_aux_local): Likewise. (lookup_symbol_aux_block): Likewise. (lookup_symbol_aux_symtabs): Likewise. (lookup_symbol_aux_psymtabs): Likewise. (lookup_global_symbol_from_objfile): Likewise. (basic_lookup_symbol_nonlocal): Likewise. (lookup_symbol_static): Likewise. (lookup_symbol_global): Likewise. (lookup_symbol_in_language): Do not pass SYMTAB to lookup_symbol_aux.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r--gdb/ada-lang.c47
1 files changed, 6 insertions, 41 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index 8f710f4..baeef0a 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -4872,8 +4872,7 @@ done:
struct symbol *
ada_lookup_encoded_symbol (const char *name, const struct block *block0,
- domain_enum namespace,
- struct block **block_found, struct symtab **symtab)
+ domain_enum namespace, struct block **block_found)
{
struct ada_symbol_info *candidates;
int n_candidates;
@@ -4886,40 +4885,7 @@ ada_lookup_encoded_symbol (const char *name, const struct block *block0,
if (block_found != NULL)
*block_found = candidates[0].block;
- if (symtab != NULL)
- {
- *symtab = candidates[0].symtab;
- if (*symtab == NULL && candidates[0].block != NULL)
- {
- struct objfile *objfile;
- struct symtab *s;
- struct block *b;
- struct blockvector *bv;
-
- /* Search the list of symtabs for one which contains the
- address of the start of this block. */
- ALL_PRIMARY_SYMTABS (objfile, s)
- {
- bv = BLOCKVECTOR (s);
- b = BLOCKVECTOR_BLOCK (bv, GLOBAL_BLOCK);
- if (BLOCK_START (b) <= BLOCK_START (candidates[0].block)
- && BLOCK_END (b) > BLOCK_START (candidates[0].block))
- {
- *symtab = s;
- return fixup_symbol_section (candidates[0].sym, objfile);
- }
- }
- /* FIXME: brobecker/2004-11-12: I think that we should never
- reach this point. I don't see a reason why we would not
- find a symtab for a given block, so I suggest raising an
- internal_error exception here. Otherwise, we end up
- returning a symbol but no symtab, which certain parts of
- the code that rely (indirectly) on this function do not
- expect, eventually causing a SEGV. */
- return fixup_symbol_section (candidates[0].sym, NULL);
- }
- }
- return candidates[0].sym;
+ return fixup_symbol_section (candidates[0].sym, NULL);
}
/* Return a symbol in DOMAIN matching NAME, in BLOCK0 and enclosing
@@ -4931,27 +4897,26 @@ ada_lookup_encoded_symbol (const char *name, const struct block *block0,
assignments occur only if the pointers are non-null). */
struct symbol *
ada_lookup_symbol (const char *name, const struct block *block0,
- domain_enum namespace, int *is_a_field_of_this,
- struct symtab **symtab)
+ domain_enum namespace, int *is_a_field_of_this)
{
if (is_a_field_of_this != NULL)
*is_a_field_of_this = 0;
return
ada_lookup_encoded_symbol (ada_encode (ada_fold_name (name)),
- block0, namespace, NULL, symtab);
+ block0, namespace, NULL);
}
static struct symbol *
ada_lookup_symbol_nonlocal (const char *name,
const char *linkage_name,
const struct block *block,
- const domain_enum domain, struct symtab **symtab)
+ const domain_enum domain)
{
if (linkage_name == NULL)
linkage_name = name;
return ada_lookup_symbol (linkage_name, block_static_block (block), domain,
- NULL, symtab);
+ NULL);
}