diff options
author | David Carlton <carlton@bactrian.org> | 2002-10-28 17:05:56 +0000 |
---|---|---|
committer | David Carlton <carlton@bactrian.org> | 2002-10-28 17:05:56 +0000 |
commit | e70ea697bd6460f4fd46b8aefe68b7009c872a1a (patch) | |
tree | f29c58837efd35813b31590c1d228f83f9e2a0f8 /gdb/symtab.c | |
parent | b1744eabdd660471faa349e0bc0b6026ba0edf28 (diff) | |
download | gdb-e70ea697bd6460f4fd46b8aefe68b7009c872a1a.zip gdb-e70ea697bd6460f4fd46b8aefe68b7009c872a1a.tar.gz gdb-e70ea697bd6460f4fd46b8aefe68b7009c872a1a.tar.bz2 |
2002-10-28 David Carlton <carlton@math.stanford.edu>
* symtab.c (find_addr_symbol): Delete. (It was already commented
out.)
* symtab.h: Delete prototype for find_addr_symbol.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r-- | gdb/symtab.c | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c index acbfa65..2ecc40b 100644 --- a/gdb/symtab.c +++ b/gdb/symtab.c @@ -1692,94 +1692,6 @@ find_pc_symtab (CORE_ADDR pc) } -#if 0 - -/* Find the closest symbol value (of any sort -- function or variable) - for a given address value. Slow but complete. (currently unused, - mainly because it is too slow. We could fix it if each symtab and - psymtab had contained in it the addresses ranges of each of its - sections, which also would be required to make things like "info - line *0x2345" cause psymtabs to be converted to symtabs). */ - -struct symbol * -find_addr_symbol (CORE_ADDR addr, struct symtab **symtabp, CORE_ADDR *symaddrp) -{ - struct symtab *symtab, *best_symtab; - struct objfile *objfile; - register int bot, top; - register struct symbol *sym; - register CORE_ADDR sym_addr; - struct block *block; - int blocknum; - - /* Info on best symbol seen so far */ - - register CORE_ADDR best_sym_addr = 0; - struct symbol *best_sym = 0; - - /* FIXME -- we should pull in all the psymtabs, too! */ - ALL_SYMTABS (objfile, symtab) - { - /* Search the global and static blocks in this symtab for - the closest symbol-address to the desired address. */ - - for (blocknum = GLOBAL_BLOCK; blocknum <= STATIC_BLOCK; blocknum++) - { - QUIT; - block = BLOCKVECTOR_BLOCK (BLOCKVECTOR (symtab), blocknum); - ALL_BLOCK_SYMBOLS (block, bot, sym) - { - switch (SYMBOL_CLASS (sym)) - { - case LOC_STATIC: - case LOC_LABEL: - sym_addr = SYMBOL_VALUE_ADDRESS (sym); - break; - - case LOC_INDIRECT: - sym_addr = SYMBOL_VALUE_ADDRESS (sym); - /* An indirect symbol really lives at *sym_addr, - * so an indirection needs to be done. - * However, I am leaving this commented out because it's - * expensive, and it's possible that symbolization - * could be done without an active process (in - * case this read_memory will fail). RT - sym_addr = read_memory_unsigned_integer - (sym_addr, TARGET_PTR_BIT / TARGET_CHAR_BIT); - */ - break; - - case LOC_BLOCK: - sym_addr = BLOCK_START (SYMBOL_BLOCK_VALUE (sym)); - break; - - default: - continue; - } - - if (sym_addr <= addr) - if (sym_addr > best_sym_addr) - { - /* Quit if we found an exact match. */ - best_sym = sym; - best_sym_addr = sym_addr; - best_symtab = symtab; - if (sym_addr == addr) - goto done; - } - } - } - } - -done: - if (symtabp) - *symtabp = best_symtab; - if (symaddrp) - *symaddrp = best_sym_addr; - return best_sym; -} -#endif /* 0 */ - /* Find the source file and line number for a given PC value and SECTION. Return a structure containing a symtab pointer, a line number, and a pc range for the entire source line. |