diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-11-04 22:22:31 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-11-04 22:22:31 +0000 |
commit | 507836c0f023b2d251d9924198866db01b8cd09e (patch) | |
tree | 96760e16141933585e8a56cade7ecb40c453de9b /gdb/symtab.c | |
parent | 1083b3bca3b81b11b4e029746bb8eceed71303f7 (diff) | |
download | gdb-507836c0f023b2d251d9924198866db01b8cd09e.zip gdb-507836c0f023b2d251d9924198866db01b8cd09e.tar.gz gdb-507836c0f023b2d251d9924198866db01b8cd09e.tar.bz2 |
2003-11-04 Andrew Cagney <cagney@redhat.com>
* symtab.c (find_active_alias): Delete function.
(lookup_block_symbol): Delete alias code.
* stabsread.c (resolve_live_range): Delete function.
(add_live_range): Delete function.
(resolve_symbol_reference): Delete function.
(define_symbol): Delete live range and alias code.
(scan_file_globals): Delete alias code.
* symtab.h (SYMBOL_RANGES): Delete macro.
(struct range_list): Delete structure.
(struct symbol): Delete field "ranges".
(SYMBOL_ALIASES): Delete macro.
(struct alias_list): Delete structure.
(struct symbol): Delete field "aliases".
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index 208b04a..1a1821a 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -114,8 +114,6 @@ struct symbol *lookup_symbol_aux_minsyms (const char *name, struct symtab **symtab); #endif -static struct symbol *find_active_alias (struct symbol *sym, CORE_ADDR addr); - /* This flag is used in hppa-tdep.c, and set in hp-symtab-read.c */ /* Signals the presence of objects compiled by HP compilers */ int hp_som_som_object_present = 0; @@ -1668,29 +1666,6 @@ lookup_block_symbol (const struct block *block, const char *name, && (linkage_name != NULL ? strcmp (SYMBOL_LINKAGE_NAME (sym), linkage_name) == 0 : 1)) { - /* If SYM has aliases, then use any alias that is active - at the current PC. If no alias is active at the current - PC, then use the main symbol. - - ?!? Is checking the current pc correct? Is this routine - ever called to look up a symbol from another context? - - FIXME: No, it's not correct. If someone sets a - conditional breakpoint at an address, then the - breakpoint's `struct expression' should refer to the - `struct symbol' appropriate for the breakpoint's - address, which may not be the PC. - - Even if it were never called from another context, - it's totally bizarre for lookup_symbol's behavior to - depend on the value of the inferior's current PC. We - should pass in the appropriate PC as well as the - block. The interface to lookup_symbol should change - to require the caller to provide a PC. */ - - if (SYMBOL_ALIASES (sym)) - sym = find_active_alias (sym, read_pc ()); - sym_found = sym; if (SYMBOL_CLASS (sym) != LOC_ARG && SYMBOL_CLASS (sym) != LOC_LOCAL_ARG && @@ -1708,38 +1683,6 @@ lookup_block_symbol (const struct block *block, const char *name, } } -/* Given a main symbol SYM and ADDR, search through the alias - list to determine if an alias is active at ADDR and return - the active alias. - - If no alias is active, then return SYM. */ - -static struct symbol * -find_active_alias (struct symbol *sym, CORE_ADDR addr) -{ - struct range_list *r; - struct alias_list *aliases; - - /* If we have aliases, check them first. */ - aliases = SYMBOL_ALIASES (sym); - - while (aliases) - { - if (!SYMBOL_RANGES (aliases->sym)) - return aliases->sym; - for (r = SYMBOL_RANGES (aliases->sym); r; r = r->next) - { - if (r->start <= addr && r->end > addr) - return aliases->sym; - } - aliases = aliases->next; - } - - /* Nothing found, return the main symbol. */ - return sym; -} - - /* Find the symtab associated with PC and SECTION. Look through the psymtabs and read in another symtab if necessary. */ |