summaryrefslogtreecommitdiff
path: root/gdb/minsyms.c
Commit message (Collapse)AuthorAgeFilesLines
* * defs.h (streq): Add prototype.Daniel Jacobowitz2003-02-041-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * utils.c (streq): New function. * dwarf2read.c (new_symbol): Use SYMBOL_SET_NAMES instead of SYMBOL_NAME and SYMBOL_INIT_DEMANGLED_NAME. * mdebugread.c (new_symbol): Likewise. * stabsread.c (define_symbol): Likewise. * coffread.c (process_coff_symbol): Likewise. * dwarfread.c (new_symbol): Likewise. * minsyms.c (prim_record_minimal_symbol_and_info): Use SYMBOL_SET_NAMES instead of setting SYMBOL_NAME. Set the language here. (install_minimal_symbols): Don't set SYMBOL_LANGUAGE or call SYMBOL_INIT_DEMANGLED_NAME. * objfiles.c: Include "hashtab.h". (allocate_objfile): Call htab_set_functions_ex for the demangled_names_hash. (free_objfile): Call htab_delete for the demangled_names_hash. * objfiles.h (struct htab): Add declaration. (struct objfile): Add demangled_names_hash. * symfile.c: Include "hashtab.h". (reread_symbols): Call htab_delete for the demangled_names_hash. (add_psymbol_to_list): Use SYMBOL_SET_NAMES instead of putting SYMBOL_NAME in the bcache. * symtab.c: Include "hashtab.h". Update comments. (create_demangled_names_hash, symbol_set_names): New functions. (symbol_find_demangled_name): New function, broken out from symbol_init_demangled_names. (symbol_init_demangled_names): Use it. * symtab.h (SYMBOL_INIT_DEMANGLED_NAME): Add missing parentheses. (SYMBOL_SET_NAMES): New macro. (symbol_set_names): Add prototype.
* Use a single, consistent representation for an empty minimalinterps-20030203-mergepointJim Blandy2003-02-031-1/+2
| | | | | | | | | | | | | | | | symbol table in an objfile. * objfiles.c (terminate_minimal_symbol_table): New function. (allocate_objfile): Call it. * objfiles.h (terminate_minimal_symbol_table): New declaration. (ALL_MSYMBOLS): No need to test whether (objfile)->msymbols is non-NULL. * minsyms.c (lookup_minimal_symbol_by_pc_section): To see whether objfile has minimal symbols, compare minimal_symbol_count to zero, instead of comparing msymbols with NULL. * objfiles.c (have_minimal_symbols): Same. * solib-sunos.c (solib_add_common_symbols): Call terminate_minimal_symbol_table. * symfile.c (reread_symbols): Same.
* * minsyms.c (lookup_minimal_symbol): Update comment.Daniel Jacobowitz2003-01-081-24/+30
| | | | | (lookup_minimal_symbol_text): Update comment. Use the hash table. (lookup_minimal_symbol_solib_trampoline): Likewise.
* 2002-07-11 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2002-07-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on patch from Daniel Berlin <dberlin@dberlin.org>. * buildsym.c: Include "demangle.h" for SYMBOL_INIT_DEMANGLED_NAME. (finish_block) For non-function blocks, hash the symbol table. For function blocks, mark the symbol table as unhashed. * minsyms.c (msymbol_hash): Return hash value without taking modulus. (msymbol_hash_iw): Likewise. (add_minsym_to_hash_table): Take modulus of msymbol_hash's return value. (add_minsym_to_demangled_hash_table): Likewise for msymbol_hash_iw. (lookup_minimal_symbol): Likewise for both. * symtab.h (struct block): Add `hashtable' flag. Comment the hashtable. (BLOCK_HASHTABLE, BLOCK_BUCKETS, BLOCK_BUCKET): New macro. (ALL_BLOCK_SYMBOLS): Update. (BLOCK_SHOULD_SORT): Do not sort hashed blocks. (struct symbol): Add `hash_next' pointer. * symtab.c (lookup_block_symbol): Search using the hash table when possible. (find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS. (search_symbols, find_addr_symbol): Likewise. * dstread.c (process_dst_block): Clear hashtable bit for new block. (read_dst_symtab): Likewise. * jv-lang.c (get_java_class_symtab): Likewise. * mdebugread.c: Include "gdb_assert.h". (shrink_block): Assert that the block being modified is not hashed. * coffread.c (patch_opaque_types): Use ALL_BLOCK_SYMBOLS. * symmisc.c (free_symtab_block): Walk the hash table when freeing symbols. (dump_symtab): Recognize hashed blocks. * printcmd.c (print_frame_args): Assert that function blocks do not have hashed symbol tables. * ada-lang.c (symtab_for_sym): Use ALL_BLOCK_SYMBOLS. (fill_in_ada_prototype, debug_print_block): Likewise. (ada_add_block_symbols): Use ALL_BLOCK_SYMBOLS. Handle hash tables.
* 2002-04-24 David S. Miller <davem@redhat.com>David S. Miller2002-04-241-46/+0
| | | | | | * symtab.h (find_stab_function_addr): Kill extern. * minsyms.c (find_stab_function_addr): Remove from here... * dbxread.c: ... to here, and mark it static.
* * coffread.c: Remove redundant static declarations. ReplaceAlexandre Oliva2002-03-191-11/+1
| | | | | | | occurrences of `PTR' with `void *'. * elfread.c, mdebugread.c, minsyms.c, mipsread.c: Likewise. * top.h (quit_cover): Likewise. * defs.h (catch_errors): Likewise.
* Approved by Jim Blandy:Fred Fish2001-12-101-2/+2
| | | | | | | | | | | 2001-12-10 Fred Fish <fnf@redhat.com> * arm-linux-tdep.c (skip_hurd_resolver): Use NULL rather than zero in args to lookup_minimal_symbol. * linespec.c (decode_line_1): Ditto. * i386-linux-tdep.c (skip_hurd_resolver): Ditto. * minsyms.c (find_stab_function_addr): Ditto. * symfile.c (simple_read_overlay_table): Ditto. (simple_read_overlay_region_table): Ditto.
* * minsyms.c (msymbol_hash): Use better hash function.Daniel Jacobowitz2001-10-121-3/+5
| | | | | | | (msymbol_hash_iw): Likewise. Terminate loop at '(' properly. * objfiles.h: Increase MINIMAL_SYMBOL_HASH_SIZE to match modern binaries.
* * symfile.c (compare_psymbols, compare_symbols): Declare usingAlexandre Oliva2001-05-291-1/+1
| | | | | | | | | PTR, as in the definition. * minsyms.c (compare_minimal_symbols): Likewise. * coffread.c (find_targ_sec): Likewise. * elfread.c (free_elfinfo, elf_locate_sections): Likewise. * mipsread.c (alphacoff_locate_sections): Likewise. * mdebugread.c (compare_blocks): Likewise.
* Add support for the GNU V3 C++ ABI.Jim Blandy2001-05-221-1/+18
| | | | | | | | | | | | | | (Includes changes by Dan Berlin.) * gnu-v3-abi.c: New file. * minsyms.c: #include "value.h" and "cp-abi.h". (install_minimal_symbols): Check the minimal symbol table for symbols that look mangled in the V3 style, and select the V3 ABI if we find any. * Makefile.in (SFILES): Add gnu-v3-abi.c. (COMMON_OBS): Add gnu-v3-abi.o. (gnu-v3-abi.o): Add new rule. (minsyms.o): Depend on $(cp_abi_h) and $(value_h).
* 2001-03-06 J.T. Conklin <jtc@redback.com>jimb_gnu_v3_branchpointJ.T. Conklin2001-03-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * symtab.h (decode_line_1): Removed declaration. * symfile.c (#include <assert.h>): Removed. * arch-utils.c (#include <ctype.h>): Removed. * c-typeprint.c: Likewise. * dbxread.c: Likewise. * gdbtypes.c: Likewise. * target.c: Likewise. * os9kread.c: Likewise. * c-valprint.c (#include "demangle.h"): Removed. * ch-typeprint.c: Likewise. * eval.c: Likewise. * f-typeprint.c: Likewise. * f-valprint.c: Likewise. * m2-typeprint.c: Likewise. * typeprint.c: Likewise. * p-typeprint.c: Likewise. * valarith.c: Likewise. * valprint.c: Likewise. * m2-typeprint.c (#include "gdb_string.h"): Removed. * nlmread.c: Likewise. * mdebugread.c (#include "gdb-stabs.h"): Removed. * minsyms.c: Likewise. * mipsread.c: Likewise. * nlmread.c: Likewise. * m2-typeprint.c (#include "obstack.h"): Removed. * m2-valprint.c: Likewise. * event-loop.c (#include <setjmp.h>): Removed.
* Update/correct copyright notices.Kevin Buettner2001-03-061-1/+2
|
* * NEWS: Document that "info symbol" works with COFF debug info andEli Zaretskii2001-02-111-0/+4
| | | | | | | its variants. * minsyms.c (lookup_minimal_symbol_by_pc_section): Don't skip symbols whose SYMBOL_BFD_SECTION is NULL.
* Replace free() with xfree().Kevin Buettner2000-12-151-1/+1
|
* Add code for (re)building the minimal symbol hash tables.Kevin Buettner2000-08-041-11/+41
|
* Protoization.gdb-post-protoization-2000-07-29Kevin Buettner2000-07-301-53/+27
|
* PARAMS removal.gdb-post-params-removal-2000-05-28Kevin Buettner2000-05-281-5/+3
|
* Cleanup discard_minimal_symbols cleanup.Andrew Cagney2000-05-161-4/+9
|
* Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni2000-05-041-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | * objfiles.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS, SECT_OFF_RODATA): Define as functions of OBJFILE. Add sect_index_text, sect_index_data, sect_index_rodata, sect_index_bss to objfile structure. * gdb-stabs.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS, SECT_OFF_RODATA): Remove. * objfiles.c (allocate_objfile): Initialize sect_index_{text,data,bss,rodata} to -1, for error detection. * symfile.c (default_symfile_offsets): Initialize sect_index_{text,data,bss,rodata} from bfd information. * xcoffread.c (xcoff_symfile_offsets): Ditto. * somread.c (som_symfile_offsets): Initialize sect_index_{text,data,bss,rodata}. * coffread.c, dbxread.c, elfread.c, hp-psymtab-read.c, hp-symtab-read.c, hpread.c, mdebugread.c, minsyms.c, mipsread.c, objfiles.c, os9kread.c, pa64solib.c, partial-stab.h, remote-os9k.c, remote-vx.c, remote.c, rs6000-nat.c, somsolib.c, stabsread.c, symfile.c, xcoffread.c: Update use of SECT_OFF_{TEXT,DATA,BSS,RODATA} to depend on the current objfile. * xcoffread.c: Add new field objfile to find_targ_sec_arg.
* * minsyms.c (prim_record_minimal_symbol_and_info): Doc fix.Jim Blandy2000-04-191-1/+1
| | | | (Thanks to Guy Harris.)
* Delete add_minsym_to_demangled_hash_table from symtabs.h. Static function.Andrew Cagney2000-04-031-0/+3
|
* demangled symbol lookup fixesDaniel Berlin2000-03-301-47/+61
|
* 2000-03-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni2000-03-091-0/+2
| | | | * minsyms.c (prim_record_minimal_symbol_and_info): Add comment.
* From Tom Tromey <tromey@cygnus.com> and Keith Seitz <?>:Jim Blandy2000-03-071-7/+81
| | | | | | | | | | | | | | | | | | | | * minsyms.c: #include <ctype.h>, for msymbol_hash_iw. (compact_minimal_symbols): Added `objfile' argument. Put symbols in the objfile's hash table. (install_minimal_symbols): Put symbols in the objfile's demangled hash table. (lookup_minimal_symbol): Use hash table to find symbol in objfile. (msymbol_hash_iw, msymbol_hash, add_minsym_to_hash_table): New functions. (prim_record_minimal_symbol_and_info): Initialize the hash link fields of the new minimal symbol. * symtab.h (struct minimal_symbol): New fields `hash_next', `demangled_hash_next'. (msymbol_hash_iw, msymbol_hash, add_minsym_to_hash_table): Declare. * objfiles.h (MINIMAL_SYMBOL_HASH_SIZE): New define. (struct objfile): New fields `msymbol_hash', `msymbol_demangled_hash'.
* import gdb-1999-09-21Jason Molenda1999-09-221-4/+19
|
* import gdb-1999-07-07 post reformatJason Molenda1999-07-071-122/+123
|
* Initial revisionStan Shebs1999-04-161-0/+904