From: David Carlton Date: Tue, 20 May 2003 01:12:47 +0000 (+0000) Subject: 2003-05-19 David Carlton X-Git-Url: http://drtracing.org/?a=commitdiff_plain;ds=sidebyside;h=eed3f8ab355ca0aa9a240d1f9eabb4320b959851;p=deliverable%2Fbinutils-gdb.git 2003-05-19 David Carlton * symtab.c (lookup_symbol_aux): Delete #if 0 hunk. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f0eb434526..b12cc7b58e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2003-05-19 David Carlton + + * symtab.c (lookup_symbol_aux): Delete #if 0 hunk. + 2003-05-19 Michal Ludvig * x86-64-tdep.c (x86_64_dwarf2gdb_regno_map): Fix diff --git a/gdb/symtab.c b/gdb/symtab.c index 06f813b668..9b01d45f7b 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -968,52 +968,6 @@ lookup_symbol_aux (const char *name, const char *linkage_name, if (sym != NULL) return sym; -#if 0 - /* NOTE: carlton/2002-11-05: At the time that this code was - #ifdeffed out, the value of 'block' was always NULL at this - point, hence the bemused comments below. */ - - /* FIXME: this code is never executed--block is always NULL at this - point. What is it trying to do, anyway? We already should have - checked the STATIC_BLOCK above (it is the superblock of top-level - blocks). Why is VAR_DOMAIN special-cased? */ - /* Don't need to mess with the psymtabs; if we have a block, - that file is read in. If we don't, then we deal later with - all the psymtab stuff that needs checking. */ - /* Note (RT): The following never-executed code looks unnecessary to me also. - * If we change the code to use the original (passed-in) - * value of 'block', we could cause it to execute, but then what - * would it do? The STATIC_BLOCK of the symtab containing the passed-in - * 'block' was already searched by the above code. And the STATIC_BLOCK's - * of *other* symtabs (those files not containing 'block' lexically) - * should not contain 'block' address-wise. So we wouldn't expect this - * code to find any 'sym''s that were not found above. I vote for - * deleting the following paragraph of code. - */ - if (domain == VAR_DOMAIN && block != NULL) - { - struct block *b; - /* Find the right symtab. */ - ALL_SYMTABS (objfile, s) - { - bv = BLOCKVECTOR (s); - b = BLOCKVECTOR_BLOCK (bv, STATIC_BLOCK); - if (BLOCK_START (b) <= BLOCK_START (block) - && BLOCK_END (b) > BLOCK_START (block)) - { - sym = lookup_block_symbol (b, name, linkage_name, VAR_DOMAIN); - if (sym) - { - block_found = b; - if (symtab != NULL) - *symtab = s; - return fixup_symbol_section (sym, objfile); - } - } - } - } -#endif /* 0 */ - /* C++/Java/Objective-C: If requested to do so by the caller, check to see if NAME is a field of `this'. */ if (is_a_field_of_this)