summaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 2003-05-02 David Carlton <carlton@bactrian.org>David Carlton2003-05-021-1/+1
| | | | | * objfiles.c (allocate_objfile): For anonymous objfiles, allocate the name with mstrsave.
* 2003-02-25 David Carlton <carlton@math.stanford.edu>David Carlton2003-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * symtab.h (SYMBOL_NATURAL_NAME): New macro. (SYMBOL_LINKAGE_NAME): Ditto. (SYMBOL_PRINT_NAME): Use SYMBOL_NATURAL_NAME and SYMBOL_LINKAGE_NAME. (struct general_symbol_info): Expand comment. (DEPRECATED_SYMBOL_NAME): Rename from SYMBOL_NAME. (SYMBOL_MATCHES_NAME): Use DEPRECATED_SYMBOL_NAME. (SYMBOL_MATCHES_REGEXP): Ditto. * symtab.c (symbol_natural_name): New function. * objfiles.h: Replace all uses of SYMBOL_NAME by DEPRECATED_SYMBOL_NAME. * xcoffread.c, valops.c, typeprint.c, tracepoint.c: Ditto. * symtab.c, symmisc.c, symfile.c, stack.c, stabsread.c: Ditto. * somsolib.c, sol-thread.c, rs6000-tdep.c, p-valprint.c: Ditto. * printcmd.c, objfiles.c, objc-lang.c, mipsread.c: Ditto. * minsyms.c, mdebugread.c, linespec.c, jv-lang.c: Ditto. * i386-tdep.c, i386-linux-tdep.c, hpread.c, hppa-tdep.c: Ditto. * gnu-v2-abi.c, f-valprint.c, findvar.c, expprint.c: Ditto. * dwarfread.c, dwarf2read.c, dbxread.c, c-valprint.c: Ditto. * cp-valprint.c, coffread.c, buildsym.c, breakpoint.c: Ditto. * blockframe.c, ax-gdb.c, arm-linux-tdep.c, ada-lang.c: Ditto. * ada-exp.y: Ditto. * ada-exp.y: Update copyright. * sol-thread.c, mipsread.c, jv-lang.c, f-valprint.c: Ditto. * cp-valprint.c: Ditto. 2003-02-25 David Carlton <carlton@math.stanford.edu> * generic/gdbtk.h: Replace all instances of SYMBOL_NAME by DEPRECATED_SYMBOL_NAME. * generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Ditto. * generic/gdbtk-stack.c, generic/gdbtk-cmds.c: Update copyright. 2003-02-25 David Carlton <carlton@math.stanford.edu> * mi-cmd-stack.c: Replace all instances of SYMBOL_NAME with DEPRECATED_SYMBOL_NAME. Update copyright.
* 2003-02-19 David Carlton <carlton@math.stanford.edu>David Carlton2003-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (SFILES): Add block.c. (block_h): New. (COMMON_OBS): Add block.o. (block.o): New. (x86-64-tdep.o): Add $(block_h). (values.o, valops.o, tracepoint.o, symtab.o, symmisc.o, symfile.o) (stack.o, printcmd.o, p-exp.tab.o, parse.o, objfiles.o) (objc-exp.tab.o, objc-lang.o, nlmread.o, mips-tdep.o, mdebugread.o) (m2-exp.tab.o, linespec.o, jv-lang.o, jv-exp.tab.o, infcmd.o) (f-valprint.o, findvar.o, f-exp.tab.o, expprint.o, coffread.o) (c-exp.tab.o, buildsym.o, breakpoint.o, blockframe.o, ax-gdb.o) (alpha-tdep.o, ada-lang.o, ada-exp.tab.o, mi-cmd-stack.o): Ditto. * value.h: Add opaque declaration for struct block. * parser-defs.h, objc-lang.h, buildsym.h, breakpoint.h: Ditto. * ada-lang.h: Ditto. * x86-64-tdep.c: #include "block.h" * values.c, valops.c, tracepoint.c, symtab.c, symmisc.c: Ditto. * symfile.c, stack.c, printcmd.c, p-exp.y, parse.c: Ditto. * objfiles.c, objc-exp.y, objc-lang.c, nlmread.c: Ditto. * mips-tdep.c, mdebugread.c, m2-exp.y, linespec.c: Ditto. * jv-lang.c, jv-exp.y, infcmd.c, f-valprint.c: Ditto. * findvar.c, f-exp.y, expprint.c, coffread.c, c-exp.y: Ditto. * buildsym.c, breakpoint.c, blockframe.c, ax-gdb.c: Ditto. * alpha-tdep.c, ada-lang.c, ada-exp.y: Ditto. * blockframe.c (blockvector_for_pc_sect): Move to "block.c". (blockvector_for_pc, block_for_pc_sect, block_for_pc): Ditto. * symtab.c (block_function): Ditto. (contained_in): Ditto. * frame.h: Move block_for_pc and block_for_pc_sect declarations to block.h. Add opaque declaration for struct block. * symtab.h: Move block_function and contained_in declarations to block.h. Add opaque declarations for struct block, struct blockvector. (struct block): Move to block.h. (struct blockvector): Ditto. (BLOCK_START, BLOCK_END, BLOCK_FUNCTION, BLOCK_SUPERBLOCK) (BLOCK_GCC_COMPILED, BLOCK_HASHTABLE, BLOCK_NSYMS, BLOCK_SYM) (BLOCK_BUCKETS, BLOCK_BUCKET, BLOCK_HASHTABLE_SIZE) (ALL_BLOCK_SYMBOLS, BLOCK_SHOULD_SORT, BLOCKVECTOR_NBLOCKS) (BLOCKVECTOR_BLOCK, GLOBAL_BLOCK, STATIC_BLOCK, FIRST_LOCAL_BLOCK): Ditto. * block.c: New file. * block.h: New file. 2003-02-19 David Carlton <carlton@math.stanford.edu> * mi-cmd-stack.c: #include "block.h"
* 2003-02-04 David Carlton <carlton@math.stanford.edu>David Carlton2003-02-041-0/+13
| | | | | | * objfiles.c (allocate_objfile): Always set name. Add comment at start of function. * jv-lang.c (get_dynamics_objfile): Add comment.
* * defs.h (streq): Add prototype.Daniel Jacobowitz2003-02-041-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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/+30
| | | | | | | | | | | | | | | | 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.
* gdb/ChangeLog:Jim Blandy2003-01-231-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2003-01-23 Alexander Larsson <alexl@redhat.com> Jim Blandy <jimb@redhat.com> Add support for executables whose debug info has been separated out into a separate file, leaving only a link behind. * objfiles.h (struct objfile): New fields: separate_debug_objfile and separate_debug_objfile_backlink. (put_objfile_before): New declaration. * symfile.c: #include "filenames.h". (symbol_file_add_with_addrs_or_offsets): If this objfile has its debug info in a separate file, read that, too. Save the addrs argument, so we can use it again to read the separated debug info; syms_from_objfile modifies the table we pass it. (reread_symbols): After re-reading an objfile, call reread_separate_symbols to refresh its separate debug info objfile, if it has one. (reread_separate_symbols, find_separate_debug_file, get_debug_link_info, separate_debug_file_exists): New functions. (debug_file_directory): New global var. (_initialize_symfile): Initialize debug_file_directory, and provide the new `set debug-file-directory' command to let the user change it. * objfiles.c (free_objfile): If this objfile has its debug info in a separate objfile, free that one too. If this is itself a separate debug info objfile, clear our parent's backlink. (put_objfile_before): New function. * utils.c (gnu_debuglink_crc32): New function. * defs.h (gnu_debuglink_crc32): New declaration. * Makefile.in (symfile.o): Note dependency on "filenames.h". * configure.in: Handle --with-separate-debug-dir config option. * acinclude.m4 (AC_DEFINE_DIR): New macro. * acconfig.h (DEBUGDIR): New macro. * configure, aclocal.m4, config.in: Regenerated. gdb/doc/ChangeLog: 2003-01-23 Jim Blandy <jimb@redhat.com> * gdb.texinfo (Separate Debug Files): New section.
* 2003-01-18 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2003-01-181-10/+10
| | | | | | | | | | | * ada-valprint.c: Eliminate PTR. * breakpoint.c, corelow.c, cris-tdep.c, dbxread.c: Ditto. * defs.h, dve3900-rom.c, dwarf2read.c, dwarfread.c: Ditto. * exec.c, hppa-tdep.c, hpread.c, infcmd.c, mdebugread.c: Ditto. * objfiles.c, objfiles.h, ocd.c, remote-es.c: Ditto. * remote-mips.c, remote-sds.c, remote-vx.c: Ditto. * solib-svr4.c, solib.c, stack.c, symfile.c, symfile.h: Ditto. * symmisc.c, v850ice.c, xcoffread.c, cli/cli-script.c: Ditto.
* 2002-07-29 Andrew Cagney <ac131313@redhat.com>Andrew Cagney2002-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gdb_obstack.h: New file. * symtab.h: Include "gdb_obstack.h" instead of "obstack.h". (obstack_chunk_alloc, obstack_chunk_free): Delete macros. * objfiles.h: Include "gdb_obstack.h". * Makefile.in (gdb_obstack_h): Define. (symtab_h): Add $(gdb_obstack_h). (objfiles_h): Add $(gdb_obstack_h). * objfiles.c: Include "gdb_obstack.h" instead of "obstack.h". * macrotab.c, cp-valprint.c, dbxread.c: Ditto. * ch-typeprint.c, ch-valprint.c, dstread.c: Ditto. * macroexp.c, p-typeprint.c, stabsread.c: Ditto. * symtab.c, f-typeprint.c, mdebugread.c: Ditto. * p-valprint.c, symmisc.c, typeprint.c: Ditto. * symfile.c, coffread.c, c-typeprint.c: Ditto. * buildsym.c, bcache.c, ada-typeprint.c: Ditto. * Makefile.in (bcache.o): Update dependencies. (buildsym.o, c-typeprint.o, ch-typeprint.o): Ditto. (ch-valprint.o, coffread.o, cp-valprint.o): Ditto. (dbxread.o, dstread.o, f-typeprint.o): Ditto. (objfiles.o, p-typeprint.o, p-valprint.o): Ditto. (stabsread.o, symfile.o, symmisc.o): Ditto. (symtab.o, typeprint.o, macroexp.o): Ditto. (macrotab.o, mdebugread.o): Ditto. (f_lang_h, coff_sym_h, coff_symconst_h): Define. (coff_ecoff_h, aout_aout64_h): Define. (aout_stabs_gnu_h, libaout_h): Define.
* * bcache.h: Update copyright.Andrew Cagney2002-07-121-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (struct bstring, struct bcache): Move definition to "bcache.c". Replaced by opaque declaration. (bcache_xfree): Replace free_bcache. (bcache_xmalloc, bcache_memory_used): Declare. * bcache.c: Update copyright. (struct bstring, struct bcache): Moved to here from "bcache.h". Update comments. (bcache_xmalloc, bcache_memory_used): New functions. (bcache_xfree): Replace function free_bcache. * Makefile.in (objfiles.o): Add $(bcache_h). (objfiles_h): Remove $(bcache_h). (symfile.o): Add $(bcache_h). * symmisc.c: Update copyright. (print_symbol_bcache_statistics): Pass psymbol_cache by value. (print_objfile_statistics): Use bcache_memory_used. * symfile.c: Include "bcache.h". (reread_symbols): Use bcache_xfree. (reread_symbols): Use bcache_xmalloc and bcache_xfree. (add_psymbol_to_list): Pass psymbol_cache by value. (add_psymbol_with_dem_name_to_list): Ditto. * objfiles.h: Update copyright. (struct bcache): Declare opaque. Do not include "bcache.h". (struct objfile): Change psymbol_cache and macro_cache to ``struct bcache'' pointers. * dwarf2read.c (macro_start_file): Pass macro_cache by value. * objfiles.c: Include "bcache.h". Update copyright. (allocate_objfile): Use bcache_xmalloc to create psymbol_cache and macro_cache. (free_objfile): Use bcache_xfree.
* Add macro structures to GDB's symbol tables. Nobody puts anythingcagney_regbuf-20020515-branchpointJim Blandy2002-05-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | in them yet. * symtab.h (struct symtab): New member: `macro_table'. * buildsym.h (pending_macros): New global variable. * buildsym.c: #include "macrotab.h". (buildsym_init): Initialize `pending_macros'. (end_symtab): If we found macro information while reading a CU's debugging info, do build a symtab structure for it. Make the symtab point to the macro information, and clear the `pending_macros' pointer which held it while we were reading the debug info. (really_free_pendings): Free any pending macro table. * objfiles.h (struct objfile): New member: `macro_cache'. * objfiles.c (allocate_objfile): Set allocate and free functions for the macro cache's objstack. (free_objfile): Empty the macro cache's obstack. * symfile.c (reread_symbols): Empty the macro cache's obstack, and set new allocate and free functions for it. * solib-sunos.c (allocate_rt_common_objfile): Set allocate and free functions for the macro cache's objstack. (Why is this function building its own objfile?) * symmisc.c (print_objfile_statistics): Print statistics on the macro bcache. * Makefile.in: Note that buildsym.o depends on macrotab.h.
* Eliminate global #include of "mmalloc.h".Andrew Cagney2001-12-061-0/+2
|
* mfree() -> xmfree().Andrew Cagney2001-12-021-16/+16
|
* 2001-10-12 Daniel Jacobowitz <drow@mvista.com>Daniel Jacobowitz2001-10-121-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * symtab.h (struct block): (ALL_BLOCK_SYMBOLS): New macro. * symtab.c (find_pc_sect_symtab): Use ALL_BLOCK_SYMBOLS. (make_symbol_completion_list): Likewise. (make_symbol_overload_list): Likewise. * buildsym.c (finish_block): Likewise. * breakpoint.c (get_catch_sals): Likewise. * mdebugread.c (mylookup_symbol): Likewise. * objfiles.c (objfile_relocate): Likewise. * printcmd.c (print_frame_args): Likewise. * stack.c (print_block_frame_locals): Likewise. (print_block_frame_labels): Likewise. (print_frame_arg_vars): Likewise. * symmisc.c (dump_symtab): Likewise. * tracepoint.c (add_local_symbols): Likewise. (scope_info): Likewise. 2001-10-12 Daniel Jacobowitz <drow@mvista.com> * mi-cmd-stack.c (list_args_or_locals): Use ALL_BLOCK_SYMBOLS. 2001-10-12 Daniel Jacobowitz <drow@mvista.com> * generic/gdbtk-cmds.c (gdb_listfuncs): Use ALL_BLOCK_SYMBOLS. * generic/gdbtk-stack.c (gdb_block_vars): Likewise. (gdb_get_blocks): Likewise. (gdb_get_vars_command): Likewise. 5~
* s/basename/lbasename/Andrew Cagney2001-07-051-2/+2
|
* Update/correct copyright notices.Kevin Buettner2001-03-061-1/+1
|
* Add __FILE__ and __LINE__ parameter to internal_error() /Andrew Cagney2001-02-081-2/+4
| | | | internal_verror().
* Replace STRCMP with strcmp()Andrew Cagney2001-01-191-1/+1
|
* Replace free() with xfree().Kevin Buettner2000-12-151-8/+8
|
* * objfiles.c (objfile_relocate): Relocate ei.entry_point withPeter Schauer2000-11-031-3/+12
| | | | its section offset, use SECT_OFF_TEXT only as a fallback.
* In objfile_relocate(), don't assume that offsets associated with oneKevin Buettner2000-09-131-19/+4
| | | | | of SECT_OFF_TEXT, SECT_OFF_DATA, or SECT_OFF_BSS will be adequate for relocating all of the sections in an objfile.
* 2000-08-07 Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni2000-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | * objfiles.h (SECT_OFF_BSS): Don't detect invalid sect_index_bss here, let the users of the macro do it. * symtab.h (ANOFFSET): Detect here if the section index is not initialized. * xcoffread.c (find_targ_sec): Don't treat .bss as special, because some objfiles may not have that section at all. * coffread.c (cs_to_section): Ditto. * elfread.c (elf_symtab_read): Detect an uninitialized index value. (elfstab_offset_sections): The macro ANOFFSET cannot be used as an lvalue anymore. * remote.c (get_offsets, remote_cisco_objfile_relocate): Don't use ANOFFSET as an lvalue. * objfiles.c (objfile_relocate, objfile_relocate): Don't use ANOFFSET as an lvalue. * symfile.c (default_symfile_offsets): Don't use ANOFFSET as an lvalue.
* Fixup SYMBOL_SECTION for objfiles_relocate().Kevin Buettner2000-08-041-6/+15
|
* Protoization.gdb-post-protoization-2000-07-29Kevin Buettner2000-07-301-44/+19
|
* PARAMS removal.gdb-post-params-removal-2000-05-28Kevin Buettner2000-05-281-8/+4
|
* Purge (almost) make_cleanup_func.Andrew Cagney2000-05-221-0/+11
|
* Elena Zannoni <ezannoni@kwikemart.cygnus.com>Elena Zannoni2000-05-041-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Deal with the inferior unloading shared objects.Jim Blandy2000-03-151-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * solib.c (current_sos): New function, replacing find_solib. (find_solib): Deleted. (free_so): New function. (clear_solib): Call free_so, instead of writing it out. (solib_add): Rewritten: compare the inferior's current list of shared objects with GDB's list, and do the required loads and unloads. (info_sharedlibrary_command, solib_address): Don't use find_solib to walk the list of shared libraries: call solib_add, and then walk the list at so_list_head normally. * objfiles.c (free_objfile): Don't call CLEAR_SOLIB, and don't detach the core target. These tasks are taken care of elsewhere. * target.c (remove_target_sections): New function. * target.h (remove_target_sections): New declaration. * solib.c (symbol_add_stub): Check whether we've already created an objfile for this shared object first, before doing all that work to compute section addresses, etc. * objfiles.c (unlink_objfile): Report an internal error if objfile doesn't occur in the object_files list. * solib.c (special_symbol_handling): Delete argument; it's not used. * solib.c (SOLIB_EXTRACT_ADDRESS): New macro to extract addresses from solib structures. Use it throughout solib.c, get rid of all CORE_ADDR casts. (struct so_list): Change type of lmaddr to CORE_ADDR. (first_link_map_member): Change return value type to CORE_ADDR, update callers. (solib_add_common_symbols): Change parameter type to CORE_ADDR, update callers. (open_symbol_file_object, find_solib): Change type of lm variable to CORE_ADDR.
* From Peter Schauer - fix mmalloc bitrot.Andrew Cagney2000-02-291-2/+2
|
* import gdb-1999-12-06 snapshotJason Molenda1999-12-071-1/+1
|
* import gdb-1999-10-11 snapshotJason Molenda1999-10-121-33/+29
|
* import gdb-1999-09-21Jason Molenda1999-09-221-5/+0
|
* import gdb-1999-09-08 snapshotStan Shebs1999-09-091-3/+2
|
* import gdb-1999-08-16 snapshotJason Molenda1999-08-161-0/+20
|
* import gdb-1999-08-09 snapshotJason Molenda1999-08-091-5/+20
|
* import gdb-1999-07-07 post reformatJason Molenda1999-07-071-254/+254
|
* import gdb-19990422 snapshotStan Shebs1999-04-261-0/+2
|
* Initial revisionStan Shebs1999-04-161-0/+988