Commit Graph

104 Commits

Author SHA1 Message Date
David Carlton eb9a305d40 2003-02-04 David Carlton <carlton@math.stanford.edu>
* objfiles.c (allocate_objfile): Always set name.  Add comment at
	start of function.
	* jv-lang.c (get_dynamics_objfile): Add comment.
2003-02-04 21:55:26 +00:00
Daniel Jacobowitz 2de7ced707 * defs.h (streq): Add prototype.
* 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.
2003-02-04 18:07:01 +00:00
Jim Blandy 158314526c Use a single, consistent representation for an empty minimal
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.
2003-02-03 20:39:41 +00:00
Jim Blandy 5b5d99cf4d gdb/ChangeLog:
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-23 23:03:32 +00:00
Andrew Cagney 4efb68b1ad 2003-01-18 Andrew Cagney <ac131313@redhat.com>
* 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.
2003-01-18 15:55:53 +00:00
Andrew Cagney 04ea0df192 2002-07-29 Andrew Cagney <ac131313@redhat.com>
* 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.
2002-07-29 22:55:26 +00:00
Andrew Cagney af5f3db67c * bcache.h: Update copyright.
(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.
2002-07-12 15:23:10 +00:00
Jim Blandy 99d9066e57 Add macro structures to GDB's symbol tables. Nobody puts anything
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.
2002-05-15 21:19:21 +00:00
Andrew Cagney ed1801dfff Eliminate global #include of "mmalloc.h". 2001-12-06 20:59:11 +00:00
Andrew Cagney aac7f4eaf2 mfree() -> xmfree(). 2001-12-02 22:38:23 +00:00
Daniel Jacobowitz e88c90f2c5 2001-10-12 Daniel Jacobowitz <drow@mvista.com>
* 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~
2001-10-12 23:51:30 +00:00
Andrew Cagney bdda63b0c5 s/basename/lbasename/ 2001-07-05 21:32:39 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Andrew Cagney 8e65ff28b0 Add __FILE__ and __LINE__ parameter to internal_error() /
internal_verror().
2001-02-08 06:03:54 +00:00
Andrew Cagney 494b7ec97e Replace STRCMP with strcmp() 2001-01-19 08:01:47 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Peter Schauer 36b0c0e021 * objfiles.c (objfile_relocate): Relocate ei.entry_point with
its section offset, use SECT_OFF_TEXT only as a fallback.
2000-11-03 19:00:06 +00:00
Kevin Buettner 78f0949be7 In objfile_relocate(), don't assume that offsets associated with one
of SECT_OFF_TEXT, SECT_OFF_DATA, or SECT_OFF_BSS will be adequate for
relocating all of the sections in an objfile.
2000-09-13 01:47:16 +00:00
Elena Zannoni a4c8257b03 2000-08-07 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* 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.
2000-08-07 15:02:48 +00:00
Kevin Buettner 7a78d0eec8 Fixup SYMBOL_SECTION for objfiles_relocate(). 2000-08-04 23:13:50 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Andrew Cagney 74b7792f0f Purge (almost) make_cleanup_func. 2000-05-22 09:02:23 +00:00
Elena Zannoni b8fbeb1874 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* 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.
2000-05-04 16:52:34 +00:00
Jim Blandy 07cd4b9723 Deal with the inferior unloading shared objects.
* 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.
2000-03-15 16:55:07 +00:00
Andrew Cagney 2fc18c15d2 From Peter Schauer - fix mmalloc bitrot. 2000-02-29 12:58:51 +00:00
Jason Molenda c2d11a7da0 import gdb-1999-12-06 snapshot 1999-12-07 03:56:43 +00:00
Jason Molenda 2df3850c7b import gdb-1999-10-11 snapshot 1999-10-12 04:37:53 +00:00
Jason Molenda c2c6d25f0d import gdb-1999-09-21 1999-09-22 03:28:34 +00:00
Stan Shebs d4f3574e77 import gdb-1999-09-08 snapshot 1999-09-09 00:02:17 +00:00
Jason Molenda 7be570e7ce import gdb-1999-08-16 snapshot 1999-08-16 19:57:19 +00:00
Jason Molenda 96baa820df import gdb-1999-08-09 snapshot 1999-08-09 21:36:23 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Ron Unrau a2266bed50 * objfiles.c (add_to_objfile_sections): All targets to define
TARGET_KEEP_SECTION to permit them to retain bfd sections that
          GDB would otherwise have discarded.
1998-06-08 22:10:37 +00:00
Fred Fish 0728afad48 * configure.in (--with-mmalloc): Add new configure arg to use the
mmalloc package.  Default is to not use it.
	(START_INFERIOR_TRAPS_EXPECTED): Define to the integer 2, not
	the string "2".
	* acconfig.h (USE_MMALLOC, FORCE_MMCHECK): Add #undef.
	* configure: Regenerated.
	* config.in: Regenerated.
	* Makefile.in (MMALLOC_DIR, MMALLOC_SRC): Remove.
	(MMALLOC): Set using configure.
	(MMALLOC_CFLAGS): Set using configure.
	* config/i386/tm-linux.h (sys_quotactl): Define to 1 rather
	than just defining it.
	* mpw-make.sed: Undefine USE_MMALLOC rather than defining NO_MMALLOC.
	* utils.c (NO_MMALLOC): Use USE_MMALLOC instead.
	* objfiles.c: ditto.
	* defs.h: ditto.
	* config/sparc/sun4os4.mh (MMALLOC_CFLAGS): Remove.
	* config/m68k/sun3os4.mh (MMALLOC_CFLAGS): Remove.
	* config/i386/cygwin32.mh (MMALLOC_CFLAGS): Remove.
	* config/alpha/alpha-osf3.mh (MMALLOC_CFLAGS): Remove.
	* config/alpha/alpha-osf2.mh (MMALLOC_CFLAGS): Remove.
	* gdbserver/Makefile.in (MMALLOC_*): Remove.
	* config/rs6000/rs6000.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/rs6000/aix4.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/powerpc/aix4.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/powerpc/aix.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/ns32k/ns32km3.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/mips/mipsm3.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/mips/decstation.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/m88k/cxux.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/i386/xm-windows.h (NO_MMALLOC, NO_MMCHECK): Remove.
	* config/i386/i386mk.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/i386/i386m3.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/i386/i386gnu.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/alpha/alpha-osf1.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
	* config/alpha/alpha-linux.mh (MMALLOC, MMALLOC_CFLAGS): Remove.
1998-01-14 04:28:29 +00:00
Fred Fish ee804cff4f * objfiles.c (objfile_relocate): Add call to breakpoint_re_set
after relocations are complete.
	* remote-vx.c (vx_add_symbols): Remove call to breakpoint_re_set,
	this is now done in objfile_relocate.
PR 11308
1997-08-19 15:46:20 +00:00
Fred Fish 40b647e9e2 * config/i386/nm-linux.h: Enable prototypes that were #ifdef out.
* config/tm-sysv4.h (in_plt_section): Add prototype.

	* maint.c (maintenance_translate_address): Avoid assignment
	inside if, per GNU coding standards.
	* symfile.c (simple_read_overlay_table): Avoid assignments inside if, per
	GNU coding standards.

	* monitor.c (parse_register_dump): Is really a void function.
	Add prototype.
	(monitor_read_memory): Remove unused variable "name".
	(monitor_read_memory): Remove unused variable "regbuf".
	(monitor_open): Remove unused variable "i".
	(get_hex_word): Apparently unused, #if away for now.
	(from_hex): Ditto.

	* i386v4-nat.c (supply_fpregset): Remove unused variable "regi".
	(fill_fpregset): Remove unused variables "regi", "to", "from" and
	"registers".

	* remote-e7000.c (ctype.h): Include.
	(e7000_insert_breakpoint): #if away unused arg used by unused expr.
	* frame.h (generic_get_saved_register): Add prototype.
	(enum lval_type): Add partial forward decl.
	* dsrec.c (make_srec): Remove unused variable "type_code".
	* remote-sim.c (gdbsim_wait): Handle sim_running and sim_polling
	cases by just ignoring them.
	(command.h): Include.

	* java-exp.y (parse_number): Remove unused variable "unsigned_p".
	* java-lang.c (gdbcore.h): Include for prototypes.
	(type_from_class): Remove unused variable "ftype".
	(type_from_class): Remove unused variable "name_length".
	(evaluate_subexp_java): Add default case to handle remaining
	enumerations.
	* java-valprint.c (c-lang.h): Include for prototypes.

	* symfile.c (simple_read_overlay_region_table): #if away
	unused function.
	(simple_free_overlay_region_table): Ditto.
	(overlay_is_mapped): Add default case to switch.
	(simple_read_overlay_region_table): Ditto.
	(simple_read_overlay_region_table): Add prototype.

	* symtab.c (fixup_symbol_section): Remove unused msym variable.
	(fixup_psymbol_section): Ditto.
	(find_pc_sect_symtab): Make distance a CORE_ADDR.

	* utils.c: Add comment about t_addr being either unsigned long or
	unsigned long long.
	(paddr): Change formats to match actual types args are cast to.
	(preg): Ditto.
	(paddr_nz): Ditto.
	(preg_nz): Ditto.
1997-06-13 17:30:24 +00:00
Per Bothner 7a9eb4c45a * defs.h (enum language): Add language_java.
* java-exp.y, java-lang.c, java-lang.h, java-valprint.c:  New files.
	* Makefile.in:  Upadte for new files.
	* objfiles.c (allocate_objfile):  Allow NULL bfd argument.
	* symfile.c (deduce_language_from_filename):  Recognize .java.
1997-04-18 02:22:18 +00:00
Michael Snyder b9580b812c Thu Apr 3 15:10:30 1997 Michael Snyder <msnyder@cleaver.cygnus.com>
Except for the two m32r modules, this checkin is for
	overlay support.

        * blockframe.c: blockvector_for_pc_sect(), block_for_pc_sect(),
        find_pc_sect_function(), find_pc_sect_partial_function(): new
        functions for debugging overlays; pc without section is ambiguous.
        * breakpoint.[ch]: add section pointer to breakpoint struct;
        add section argument to check_duplicates(); check section as well
        as pc in [breakpoint_here_p(), breakpoint_inserted_here_p(),
        breakpoint_thread_match(), bpstat_stop_status()];
        add section argument to describe_other_breakpoints();
        use INIT_SAL() macro to zero-out new sal structures;
        make resolve_sal_pc() fix up the sal's section as well as its pc;
        match on section + pc in clear_command() and delete_breakpoint();
        account for overlay sections in insert_breakpoints(),
        remove_breakpoint() and breakpoint_re_set_one();
        all this to support overlays where a PC is not unique.
        * exec.c: change xfer_memory() to handle overlay sections.
        * findvar.c: change read_var_value() to handle overlay sections.
        * frame.h: declaration for block_for_pc_sect() [blockframe.c].
        * infcmd.c: jump_command() warns against jumping into an overlay
        that's not in memory.  Also use INIT_SAL() to initialize sals.
        * infrun.c: wait_for_inferior() sets a flag to invalidate cached
        overlay state information; Also use INIT_SAL() to init sals.
        * m32r-rom.c: modify load routines to use LMA instead of VMA.
        * m32r-stub.c: mask exit value down to 8 bits; screen out any
        memory read/writes in the range 600000 to a00000, and ff680000
        to ff800000 (hangs because nothing is mapped there); fix strcpy().
        * maint.c: maintenance command "translate-address" supports overlays.
        * minsyms.c: lookup_minimal_symbol_by_pc_sect() supports overlays.
        * objfiles.[ch]: add ovly_mapped field to the obj_section struct;
        this constitutes gdb's internal overlay mapping table.  Add macro
        ALL_OBJSECTIONS() to loop thru the obj_structs and look at overlays.
        Add function find_pc_sect_section().
        * printcmd.c: modify print_address_symbolic() with overlay smarts;
        modify address_info() with overlay smarts; add function sym_info()
        to support the INFO SYMBOL command (translate address to symbol(s));
        modify disassemble_command() to work on unmapped overlays.
        * source.c: use INIT_SAL() to initialize sals.
        * symfile.[ch]: change generic_load() to use section's LMA address
        instead of VMA address, for overlay sections.
        Add numerous functions for finding a PC's section / overlay,
        translating between VMA and LMA address ranges, determining if an
        overlay section is mapped, etc.  Add several user commands for
        overlay debugging.  Add support for a "generic" form of automatically
        reading overlay mapping info from the inferior (based on the default
        (simple) overlay manager which Cygnus provides as an example).
        * symtab.[ch]: add functions find_pc_sect_symtab(),
        find_pc_sect_psymtab(), find_pc_sect_psymbol(), find_pc_sect_line()
        for lookup; modify lookup_symbol and decode_line_1() to use them;
        modify find_function_start_sal() to account for overlay sections;
        add macro INIT_SAL() for initializing struct symtab_and_line.
        * target.c: fix a comment in the declaration of target_ops.
1997-04-03 23:19:46 +00:00
Fred Fish f2bf454e0f * config/mips/tm-mips.h (struct frame_info): Forward decl.
(struct type): Ditto.
	(struct value): Ditto.

	* config/mips/tm-mips.h (sigtramp_address): Move extern decl
 	from mips-tdep.c to here.
	(sigtramp_end): Ditto.
	(fixup_sigtramp): Ditto.

	* config/mips/tm-mips.h (init_extra_frame_info): Add prototype.
	(mips_frame_chain): Ditto.
	(mips_step_skips_delay): Ditto.
	(mips_frame_saved_pc): Ditto.
	(mips_find_saved_regs): Ditto.
	(mips_frame_num_args): Ditto.
	(mips_pop_frame): Ditto.
	(mips_extract_return_value): Ditto.
	(mips_store_return_value): Ditto.
	(mips_push_dummy_frame): Ditto.
	(mips_push_arguments): Ditto.
	(mips_do_registers_info): Ditto.
	(ecoff_relocate_efi): Ditto.
	(ecoff_relocate_efi): Ditto.
	* irix4-nat.c (fetch_core_registers): Add prototype.
	* mips-tdep.c (read_next_frame_reg): Add prototype
	(heuristic_proc_start): Ditto.
	(heuristic_proc_desc): Ditto.
	(mips_print_register): Ditto.
	* config/mips/nm-irix5.h (procfs_set_watchpoint): Add prototype.
	(procfs_stopped_by_watchpoint): Ditto.
	* config/mips/nm-irix4.h (procfs_set_watchpoint): Add prototype.
	(procfs_stopped_by_watchpoint): Ditto.
	* config/alpha/tm-alpha.h (ecoff_relocate_efi): Add prototype.
	(struct symbol): Add forward decl for prototype.

	* breakpoint.c (internal_breakpoint_number): Only needed if
	GET_LONGJMP_TARGET or SOLIB_ADD is defined.

	* objfiles.c (ecoff_relocate_efi): Remove prototype.
1996-07-28 21:41:09 +00:00
Fred Fish b607efe714 See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996  Fred Fish  <fnf@cygnus.com>

for a rather huge set of changes.  I was going to put them here, but it
made cvs dump core.  :-(
1996-07-26 03:01:51 +00:00
Fred Fish 0a4d0a494e Fix thinko in previous patch 1996-07-13 04:50:40 +00:00
Fred Fish c0e6ae2e2e * objfiles.c (map_to_file): Error return from mmalloc_findbase is
a NULL pointer, not a -1.
Fix oops from a previous checkin.
1996-07-13 01:12:11 +00:00
Fred Fish 5410991408 * Makefile.in (MMALLOC_CFLAGS): Eliminate intermediate MMALLOC_DISABLE
and MMALLOC_CHECK macros, and add comment indicating how host dependent
	makefile fragment should modify MMALLOC_CFLAGS to not use mmalloc, or
	to use it but to not do heap corruption checking.
	* gdbserver/Makefile.in: Ditto.
	* utils.c (init_malloc): Replace warning() use with direct call of
	fprintf_unfiltered, since current_target has not yet been set and thus
 	we cannot use warning().  If we try to use mmcheck and it fails,
	suggest that this configuration needs NO_MMCHECK or MMCHECK_FORCE
 	defined.  Other small mmalloc related cleanups.
	* config/sparc/sun4os4.mh (MMALLOC_CFLAGS): Define MMCHECK_FORCE to 1.
	* config/alpha/alpha-osf2.mh (MMALLOC_CFLAGS): Set to -DNO_MMCHECK.

	* config/sparc/xm-sun4os4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/i386/xm-i386v4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/i386/xm-linux.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/m68k/xm-hp300hpux.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/m68k/xm-m68kv4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT);
	* config/m68k/xm-sun3os4.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/pa/xm-hppah.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	* config/sparc/xm-sun4sol2.h (MMAP_BASE_ADDRESS, MMAP_INCREMENT):
	Remove obsolete defines.

	* config/alpha/alpha-linux.mh (MMALLOC_DISABLE):
	* config/alpha/alpha-osf1.mh (MMALLOC_DISABLE):
	* config/rs6000/rs6000.mh (MMALLOC_DISABLE):
	* config/rs6000/aix4.mh (MMALLOC_DISABLE):
	* config/powerpc/aix4.mh (MMALLOC_DISABLE):
	* config/powerpc/aix.mh (MMALLOC_DISABLE):
	* config/ns32k/ns32km3.mh (MMALLOC_DISABLE):
	* config/mips/mipsm3.mh (MMALLOC_DISABLE):
	* config/mips/decstation.mh (MMALLOC_DISABLE):
	* config/m88k/cxux.mh (MMALLOC_DISABLE):
	* config/i386/i386mk.mh (MMALLOC_DISABLE):
	* config/i386/i386m3.mh (MMALLOC_DISABLE):
	* config/i386/i386gnu.mh (MMALLOC_DISABLE):
	Use MMALLOC_CFLAGS instead.
1996-07-11 07:41:51 +00:00
Fred Fish 5579919f7d * Makefile.in (scm-exp.o, scm-lang.o, scm-valprint.o): Add targets and
dependencies.
	* scm-lang.c (gdb_string.h): Include.
	* objfiles.c (add_to_objfile_sections): Cast second arg of obstack_grow
	call to correct type (char *).
	* cp-valprint.c (cp_print_static_field): Ditto.
	* somsolib.c (som_solib_create_inferior_hook): Add a declaration
	for external find_unwind_entry function (from hppa-tdep.c).
	* remote-pa.c (remote_write_bytes, remote_read_bytes): Change
	type of second arg to "char *" to be type compatible with
	dcache.
	(remote_wait): Cast second arg to strtol to correct type.
	* hppa-tdep.c (compare_unwind_entries): Change argument types to
	"const void *" to be type compatible with qsort, and then
	assign to local args prior to use.
1996-04-09 06:09:33 +00:00
Fred Fish 2ad5709f00 * bcache.c, bcache.h: New files to implement a byte cache.
* Makefile.in (SFILES): Add bcache.c.
	(symtab_h): Add bcache.h.
	(HFILES_NO_SRCDIR): add bcache.h
	(COMMON_OBJS): Add bcache.o
	(bcache.o): New target.
	* dbxread.c (start_psymtab): Make global_syms & static_syms
 	type "partial_symbol **".
	* hpread.c (hpread_start_symtab):  Ditto.
	* os9kread.c (os9k_start_psymtab):  Ditto.
	* stabsread.h (start_psymtab):  Ditto.
	* {symfile.c, symfile.h} (start_psymtab_common):  Ditto.
	* maint.c (maintenance_print_statistics): Call
 	print_symbol_bcache_statistics.
	* objfiles.c (allocate_objfile): Initialize psymbol bcache malloc
	and free pointers.
	* solib.c (allocate_rt_common_objfile): Ditto.
	* symfile.c (reread_symbols):  Ditto.
	(free_objfile): Free psymbol bcache when objfile is freed.
	(objfile_relocate): Use new indirect psymbol pointers.
	* objfiles.h (struct objfile): Add psymbol cache.
	* symfile.c (compare_psymbols): Now passed pointers to pointers to
	psymbols.
	(reread_symbols): Free psymbol bcache when freeing other objfile
	resources.
	(add_psymbol_to_list, add_psymbol_addr_to_list): Initialize new
	psymbol using the psymbol bcache.
	(init_psymbol_list): Psymbol lists now contain pointers rather than
	the actual psymbols.
	* symfile.h (psymbol_allocation_list): Psymbol lists now dynamically
	grown arrays of pointers.
	(ADD_PSYMBOL_VT_TO_LIST): Initialize new symbol using the psymbol
	bcache.
	* symmisc.c (print_partial_symbols): Now takes pointer to pointer
	to partial symbol.
	(print_symbol_bcache_statistics): New function to print per objfile
 	bcache statistics.
	(print_partial_symbol, print_partial_symbols,
 	maintenance_check_symtabs, extend_psymbol_list):
 	Account for change to pointer to pointer to partial symbol.
	* symtab.c (find_pc_psymbol, lookup_partial_symbol, decode_line_2,
	make_symbol_completion_list):
 	Account for change to pointer to pointer to partial symbol.
	* symtab.h (bcache.h): Include.
	* xcoffread.c (xcoff_start_psymtab): Make global_syms & static_syms
 	type "partial_symbol **".
1996-02-16 22:14:47 +00:00