Commit Graph

59 Commits

Author SHA1 Message Date
Michael Snyder 466d7106f6 2002-08-15 Michael Snyder <msnyder@redhat.com>
* irix5-nat.c (supply_gregset): Allocate plenty-big buffer
	(32 bytes) instead of using MAX_REGISTER_RAW_SIZE.
	(supply_fpregset): Ditto.
2002-08-16 02:01:50 +00:00
Kevin Buettner dabbe2c0bd * irix5-nat.c: Move IRIX shared library support from here...
* solib-irix.c: ...to here.  Revised substantially to work with
	generic solib framework.
2002-07-27 01:05:07 +00:00
Andrew Cagney 81a9a963a1 * memattr.c (mem_command): Eliminate ``true'' and ``false''.
* osfsolib.c (solib_map_sections): Ditto.
* irix5-nat.c (solib_map_sections): Ditto.
* corelow.c (gdb_check_format): Ditto.
* symfile.c (symfile_bfd_open): Ditto.
* solib.c (solib_map_sections): Ditto.
Partially fix PR gdb/354.
2002-02-27 01:40:36 +00:00
Fred Fish 990f9fe3aa Approved by kev@cygnus.com
ChangeLog entry:

	2001-11-01  Fred Fish  <fnf@redhat.com>

	* coff-solib.c (coff_solib_add): Add new readsyms arg.
	* irix5-nat.c (solib_add): Ditto.
	* osfsolib.c (solib_add): Ditto.
	* pa64solib.c (pa64_solib_add): Ditto.
	* pa64solib.c (add_to_solist): Ditto.
	* pa64solib.c (read_dld_descriptor): Ditto.
	* solib.c (solib_add): Ditto.
	* somsolib.c (som_solib_add): Ditto.
	* win32-nat.c (child_solib_add): Ditto.
	* xcoffsolib.c (solib_add): Ditto.

	* coff-solib.h (coff_solib_add): Add new readsyms arg to prototype.
	* pa64solib.c (add_to_solist): Ditto.
	* pa64solib.c (read_dld_descriptor): Ditto.
	* pa64solib.h (pa64_solib_add): Ditto.
	* solib.h (solib_add): Ditto.
	* somsolib.h (som_solib_add): Ditto.
	* config/i386/tm-cygwin.h (child_solib_add): Ditto.

	* coff-solib.c (coff_solib_add):  If readsyms is zero don't read
	symbols but do any other needed work for shared libs.
	* irix5-nat.c: Ditto.
	* osfsolib.c (solib_add): Ditto.
	* solib.c (solib_add): Ditto.
	* win32-nat.c (child_solib_add): Ditto.
	* xcoffsolib.c (solib_add): Ditto.

	* irix5-nat.c (sharedlibrary_command): Pass 1 as readsyms to
	solib_add to force reading of shared library symbols.
	* osfsolib.c (sharedlibrary_command;): Ditto.
	* pa64solib.c (pa64_solib_sharedlibrary_command): Ditto.
	* solib.c (sharedlibrary_command): Ditto.
	* somsolib.c (som_solib_sharedlibrary_command): Ditto.
	* xcoffsolib.c (sharedlibrary_command): Ditto.

	* coff-solib.c (coff_solib_create_inferior_hook): Call solib_add
	unconditionally with auto_solib_add.
	* irix5-nat.c (solib_create_inferior_hook): Ditto.
	* osfsolib.c (solib_create_inferior_hook): Ditto.
	* solib.c (solib_create_inferior_hook): Ditto.
	* solib-osf.c (osf_solib_create_inferior_hook): Ditto.
	* solib-svr4.c (enable_break): Ditto.
	* solib-sunos.c (sunos_solib_create_inferior_hook): Ditto.

	* corelow.c (solib_add_stub): Add auto_solib_add to args passed
	via SOLIB_ADD.
	* sol-thread.c (sol_thread_attach): Ditto.
	* config/rs6000/nm-rs6000.h (SOLIB_ADD): Ditto.

	* infcmd.c (attach_command): Remove auto_solib_add decl.
	Call SOLIB_ADD directly with auto_solib_add.
	* infrun.c (handle_inferior_event): Ditto.

	* coff-solib.h (SOLIB_ADD): Add readsyms arg.
	* pa64solib.h (SOLIB_ADD): Ditto.
	* solib.h (SOLIB_ADD): Ditto.
	* somsolib.h (SOLIB_ADD): Ditto.
	* config/i386/tm-cygwin.h (SOLIB_ADD): Ditto.

	* fork-child.c (clone_and_follow_inferior): Remove unused
	auto_solib_add decl.

	* pa64solib.c (pa64_solib_add): Call add_to_solist with readsyms.
	(read_dld_descriptor): Ditto.
	(pa64_solib_add): Call read_dld_descriptor with	readsyms.
	(pa64_solib_in_dynamic_linker): Ditto.

	* corelow.c (symfile.h): Need this for auto_solib_add declaration.
	* sol-thread.c (symfile.h): Ditto.

Approved by eliz@is.elta.co.il
doc/ChangeLog entry:

	2001-11-01  Fred Fish  <fnf@redhat.com>

	* gdbint.texinfo (SOLIB_ADD): Document additional new
	"readsyms" arg.
2001-11-01 16:17:08 +00:00
Fred Fish b7209cb4ed Changes approved by kev@cygnus.com, ezannoni@cygnus.com, eliz@is.elta.co.il.
Changelog:

	2001-10-27  Fred Fish  <fnf@redhat.com>

	* symfile.c (auto_solib_add): Update comment to note that
	this variable is now just used as a boolean to control shlib
	autoloading, and clarify when it is used.
	* symfile.h (auto_solib_add): Ditto.

	* symfile.c (auto_solib_limit): New variable that holds the
	autoloading threshold instead of overloading auto_solib_add.
	* symfile.h (auto_solib_limit): Ditto.

	* irix5-nat.c (_initialize_solib): Change auto-solib-add
	variable from var_zinteger to var_boolean and update help.
	* osfsolib.c (_initialize_solib): Ditto.
	* pa64solib.c (_initialize_pa64_solib): Ditto.
	* solib.c (_initialize_solib): Ditto.
	* somsolib.c (_initialize_som_solib): Ditto.
	* xcoffsolib.c (_initialize_solib): Ditto.

	* pa64solib.c (pa64_solib_total_st_size): Update comment to
	note that the new auto_solib_limit variable is used instead
	of overloading auto_solib_add variable.
	(_initialize_pa64_solib): Ditto.
	* somsolib.c (som_solib_total_st_size): Ditto.
	(_initialize_som_solib): Ditto.

	* pa64solib.c (_initialize_pa64_solib): Add new set/show
	commands for auto-solib-limit variable.
	* somsolib.c (_initialize_som_solib): Ditto

	* pa64solib.c (add_to_solist): Check that auto_solib_add is
	set and use auto_solib_limit as the threshold size instead
	of auto_solib_add.
	* somsolib.c (som_solib_add): Ditto, and also change warning
	text about size threshold exceeded.

  doc/ChangeLog:

	2001-10-28  Fred Fish  <fnf@redhat.com>

	* gdb.texinfo (auto-solib-add): Change docs to match
	implementation change.
	(auto-solib-limit): Add docs for new variable.
2001-10-30 04:05:36 +00:00
Kevin Buettner 2069d78d3c Commit Ilya Golubev's clear_solib() fixes. 2001-09-14 00:40:29 +00:00
Kevin Buettner 39f770628a Phase 1 of the ptid_t changes. 2001-05-04 04:15:33 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Andrew Cagney 4e052eda91 Create new file regcache.h. Update all uses. 2001-03-01 01:39:22 +00:00
Kevin Buettner b8c9b27d1e Replace free() with xfree(). 2000-12-15 01:01:51 +00:00
Kevin Buettner 16bce26c35 Protoization. 2000-09-11 07:36:07 +00:00
Michael Snyder 35fc82857e 2000-08-09 Michael Snyder <msnyder@cleaver.cygnus.com>
* blockframe.c (sigtramp_saved_pc): Use dynamic allocation,
        since TARGET_PTR_BIT is no longer a constant (MULTI_ARCH).
        * irix4-nat.c (get_longjmp_target): Ditto.
        * irix5-nat.c (get_longjmp_target): Ditto.
        * jv-valprint.c (java_value_print): Ditto.
        * m3-nat.c (get_cprocs):            Ditto.
        * m68k-tdep.c (get_longjmp_target): Ditto.
        * mips-nat.c  (get_longjmp_target): Ditto.
        * mipsv4-nat.c(get_longjmp_target): Ditto.
        * pa64solib.c (read_dynamic_info):  Ditto.
        * solib.c (elf_locate_base):        Ditto.
2000-08-09 20:09:01 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Andrew Cagney ac2e2ef7e2 Add host_pointer_to_address() and address_to_host_pointer(). Add
signed_pointer_to_address() etc.  Rename generic_pointer_to_address()
to unsigned_pointer_to_address() etc.
2000-06-04 13:46:37 +00:00
Kevin Buettner a14ed312fd PARAMS removal. 2000-05-28 01:12:42 +00:00
Michael Snyder c60c0f5f88 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
* gregset.h: New file.  Typedefs for gdb_gregset_t and
        gdb_fpregset_t, prototypes for supply_gregset and friends.
        * procfs.c: Include gregset.h.  Delete local prototypes for
        supply_gregset etc., and local typedef gdb_gregset_t etc.
        * sol-thread.c: Include gregset.h, delete local prototypes,
        add appropriate casts to gdb_gregset_t.
        * uw-thread.c, lin-thread.c, core-sol2.c, core-regset.c,
        sparc-tdep.c, ptx4-nat.c, ppc-linux-nat.c, mipsv4-nat.c,
        m88k-nat.c, m68klinux-nat.c, m68k-tdep.c, irix5-nat.c,
        irix4-nat.c, ia64-linux-nat.c, i386v4-nat.c, cxux-nat.c,
        arm-linux-nat.c, alpha-nat.c: Include gregset.h.
        * config/nm-linux.h: Define GDB_GREGSET_T, GDB_FPREGET_T.
        * config/sparc/tm-sun4sol2.h: Ditto.
2000-05-26 23:22:41 +00:00
Elena Zannoni a034fba4ec 2000-04-27 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* cxux-nat.c (add_shared_symbol_files): Don't treat .text section
 	as special in the section_addr_info structure.
	* pa64solib.c (pa64_solib_add_solib_objfile): Ditto.
	* osfsolib.c (symbol_add_stub): Ditto.
	* irix5-nat.c (symbol_add_stub): Ditto.
2000-04-27 15:11:14 +00:00
H.J. Lu 8898755195 2000-04-03 H.J. Lu <hjl@gnu.org>
* gdb_regex.h: New. Include "regex.h" if USE_INCLUDED_REGEX
	is defined and <regex.h> otherwise.

        * irix5-nat.c: Include "gdb_regex.h" instead of "gnu-regex.h".
	* monitor.c: Likewise.
	* osfsolib.c: Likewise.
	* solib.c: Likewise.
	* source.c: Likewise.
	* symtab.c: Likewise.

	* Makefile.in (REGEX): Changed to @REGEX@.
	(REGEX_CFLAGS): New.
	(REGEX1): Removed.
	(ADD_DEPS): Use $(REGEX) instead of $(REGEX1).
	(INTERNAL_WARN_CFLAGS): Add $(REGEX_CFLAGS).

	* configure.in (--with-included-regex): New switch.
	(REGEX): New. Subsstitue @REGEX@ in Makefile.in.
	(REGEX_CFLAGS): New. Subsstitue @REGEX_CFLAGS@ in Makefile.in.
	* configure: Regenerated.
2000-04-04 02:08:52 +00:00
Jason Molenda 4ce44c668d import gdb-1999-11-16 snapshot 1999-11-17 02:31:06 +00:00
Jason Molenda 2df3850c7b import gdb-1999-10-11 snapshot 1999-10-12 04:37:53 +00:00
Jason Molenda 2acceee218 import gdb-1999-10-04 snapshot 1999-10-05 23:13:56 +00:00
Jason Molenda 6426a772a2 import gdb-1999-09-28 snapshot 1999-09-28 21:55:21 +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 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 d5abf0a4e6 fix copyright years (forgot to add 1999). 1999-01-19 17:01:36 +00:00
David Taylor 5337bd558b disable_breakpoints_in_shlibs now takes a new parameter -- silent; callers
updated.  new callers -- clear_solib (irix5-nat.c, osfsolib.c, solib.c).
PR 16495 / PR 18213.
1999-01-19 16:20:39 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Michael Snyder a00dfa360a Tue Jun 23 11:14:04 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
* config/mips/tm-irix5.h: Modify to work better on irix 6, by
	making FP registers 8 bytes instead of 4.
	REGISTER_BYTES: redefine.  REGISTER_BYTE(): redefine.
	REGISTER_VIRTUAL_TYPE: redefine.  MIPS_LAST_ARG_REGNUM: redefine.
	* irix5-nat.c (fetch_core_registers): read 8 bytes per FP register.
	* mips-tdep.c (FP_REGISTER_DOUBLE): new macro to distinguish
	targets with 8-byte FP registers (don't use TARGET_MIPS64).
	(STACK_ARGSIZE): new macro, how much space is taken up on the
	stack for each function argument (don't use TARGET_MIPS64).
	(mips_push_arguments): modify logic to work better on Irix 6
	(n32 ABI).
1998-06-23 18:22:43 +00:00
Peter Schauer b420cea7eb Handle missing shared libraries during the examination of a core
dump gracefully.
	* solib.c (find_solib):  Use catch_errors around call to
	solib_map_sections. Use warning instead of error if reading of
	the shared library name fails.
	(solib_map_sections):  Change return and argument types to make
	it callable from catch_errors.
	(symbol_add_stub):  Avoid GDB core dump if solib->abfd is NULL.
	* irix5-nat.c, osfsolib.c (xfer_link_map_member, solib_map_sections,
	symbol_add_stub):  Ditto.
1998-04-22 20:17:44 +00:00
Peter Schauer bb4569b9f6 * irix5-nat.c (fill_gregset): Sign extend registers before
filling in the gregset structure.
1996-12-21 10:10:43 +00:00
Peter Schauer 1d275068e9 * irix5-nat.c (supply_gregset, fill_gregset): Handle gregsets
from O32 and N32 ABI.
	(xfer_link_map_member):  Work around problem with alignments
	in struct obj when compiling GDB under N32 ABI.
1996-12-08 08:38:34 +00:00
Peter Schauer 0db3fe94c3 Add support for Irix 6.2 native O32 and N32 ABI.
* config.in, configure.in, configure:  Check for <objlist.h>.
	* configure.tgt:  Handle mips*-sgi-irix6* like irix5 for now.

	* cp-valprint.c (cp_print_value_fields):  Use SYMBOL_VALUE_ADDRESS
	instead of SYMBOL_BLOCK_VALUE to get the address of a static member.

	* dwarf2read.c:  Turn warnings and recoverable errors into complaints,
	add new complaints where appropriate.
	gcc -Wall cleanup.
	(struct line_head):  Change line_base from char to int to avoid
	problems with compilers whose plain char is represented by an
	unsigned char.
	(struct partial_die_info):  Add is_declaration field.
	(dwarf2_tmp_obstack):  New obstack for allocating temporary storage
	used during symbol reading.
	(cu_header_offset):  New variable for resolving relative reference
	dies.
	(optimized_out, basereg, islocal, frame_base_reg, frame_base_offset):
	New interface variables for decode_locdesc.
	(struct dwarf2_pinfo):  New structure for communication between
	psymtab and symtab reading, passed via pst->read_symtab_private.
	(dwarf2_has_info, dwarf2_build_psymtabs):  Accept objects files
	without line number sections.
	(dwarf2_build_psymtabs_hard):  Initialize temporary obstack
	for symbol reading.
	Allocate and initialize pst->read_symtab_private.
	Relocate pst->textlow and pst->texthigh with baseaddr.
	(scan_partial_symbols):  Do not add DW_AT_declaration symbols
	to the partial symbol table.
	Add file scope enumerator symbols to the partial symbol table.
	Fix typo in highpc computation.
	If we didn't find a lowpc, set it to highpc to avoid complaints
	from `maint check.
	(add_partial_symbol):  Relocate symbol values with baseaddr.
	Add static DW_TAG_subprogram and DW_TAG_variable symbols to the
	minimal symbol table.
        Obtain symbol values for DW_TAG_variable symbols from the location
	descriptor, skip symbols with missing location desciptors.
	Skip symbols for aggregate types without children.
	Handle enumerator symbols.
	(dwarf2_psymtab_to_symtab):  Issue symbol reading message if verbose.
	(psymtab_to_symtab_1):  Set local variables from
	pst->read_symtab_private, set cu_header_offset and baseaddr.
	Initialize temporary obstack for symbol reading, initialize
	buildsym and add a cleanup to really_free_pendings.
	Relocate highpc with baseaddr when calling end_symtab.
	If the compilation is from a C file generated by language
	preprocessors, do not set the symtab language if it was already
	deduced by start_subfile.
	Removed verbose sorting symbol table message.
	(process_die):  Handle DW_TAG_ptr_to_member_type and
	DW_TAG_reference_type.
	Use read_subroutine_type to get the function type for
	DW_TAG_subprogram before calling read_func_scope.
	(read_file_scope):  Initialize file name to <unknown>, start_subfile
	expects a non-NULL name.
	If we didn't find a lowpc, set it to highpc to avoid complaints
	from finish_symbol.
	Relocate lowpc and highpc with baseaddr.
	Get rid of Irix6.2 native cc compile machine prefix in comp_dir.
	Zero out ftypes for each new compilation unit (may be different
	language or different objfile).
	Accept compilation units without line number information, pass
	comp_dir to decode_lines.
	(read_func_scope):  Initialize function name to <unknown> to avoid
	core dumps when DW_AT_name is missing.
	Relocate lowpc and highpc with baseaddr.
	Handle DW_AT_frame_base, keep result for DW_OP_fbreg operations.
	Pass function type to new_symbol.
	(read_lexical_block_scope):  Relocate lowpc and highpc with baseaddr.
	(read_structure_scope):  Set TYPE_TAG_NAME, not TYPE_NAME.
	Handle DW_TAG_class_type.
	Copy fields to type_obstack, release temporary storage for fields.
	Don't add symbol if die is a stub die and has no children.
	Handle C++ static member fields.
	(read_enumeration):  Set TYPE_TAG_NAME, not TYPE_NAME.
	Copy fields to type_obstack, release temporary storage for fields.
	Let new_symbol handle the symbol creation for enumerators
	instead of handcrafting a symbol.
	Determine signedness of enum type from enumerators.
	(dwarf_read_array_type):  Handle variable length arrays.
	Use lookup_pointer_type instead of handcrafting a type.
	Create array type only if a DW_TAG_subrange_type was found.
	(read_tag_pointer_type, read_tag_reference_type):
	Use lookup_pointer_type and lookup_reference_type instead
	of handcrafting a type.
	(read_tag_ptr_to_member_type):  New function to handle
	DW_TAG_ptr_to_member_type.
	(read_subroutine_type):  Handle parameter dies.
	Use lookup_function_type instead of handcrafting a type.
	(read_typedef):  Allocate a TYPE_CODE_TYPEDEF type for the typedef.
	(read_base_type):  If the type has a name, use init_type to create
	a new type instead of second guessing a fundamental type.
	(read_comp_unit):  Reset die reference table before building
	a new one.
	(dwarf2_read_section):  Read section contents into psymbol_obstack.
	(dwarf2_read_abbrevs):  Handle unterminated abbreviations
	for a compile unit gracefully.
	(read_partial_die):  Zero partial die before reading its info.
	Handle DW_AT_declaration.
	Fix typo in handling of DW_FORM_block4.
	(read_full_die):  Fix typo in handling of DW_FORM_block4.
	(read_1_signed_byte, read_2_signed_bytes, read_4_signed_bytes):
	New routines to get signed values from a buffer.
	(read_n_bytes, read_string):  Allocate storage from the temporary
	obstack. If the host char size permits it, return pointer
	to buffer instead of allocating storage.
	(set_cu_language):  Handle DW_LANG_Mips_Assembler.
	(dwarf_attr):  Return NULL if reference die for DW_AT_specification
	or DW_AT_abstract_origin die is not found.
	(record_minimal_symbol):  Removed, replaced with a direct call to
	prim_record_minimal_symbol, it now handles saving the string itself.
	(convert_locdesc):  Removed, partial symtab reading now uses
	decode_locdesc.
	(dwarf_attr):  Use dwarf2_get_ref_die_offset to get the absolute
	offset for the die reference.
	(dwarf_decode_lines):  Complain if the line section info is missing.
	Use read_1_signed_byte to extract lh.line_base to avoid
        problems with compilers whose plain char is represented by an
        unsigned char.
	Add cleanups for allocated temporary storage.
	Start a subfile for the first file in the state machine.
	Fix off by one problem with dirs.dirs access.
	Use comp_dir when directory index is 0.
	Support multiple sequences (from Jason Merrill <jason@cygnus.com>).
	(dwarf2_start_subfile):  Try to keep line numbers from identical
	absolute and relative file names in a common subfile.
	(new_symbol):  Allocate symbol and symbol name on the symbol_obstack.
	Set SYMBOL_LINE from DW_AT_decl_line if present.
	Set SYMBOL_TYPE from passed type if not NULL.
	Change DW_TAG_variable symbol types with missing type entries
	to a sensible type.
	Handle optimized_out, offreg and islocal storage classes.
	Add external symbols with type information whose address isn't
	known as LOC_UNRESOLVED symbols.
	Synthesize typedefs for C++ classes, structs, unions and enumerations.
	Handle DW_TAG_enumerator symbols, complain for unrecognized
	symbol tags.
	(die_type):  A missing DW_AT_type represents a void type.
	Use dwarf2_get_ref_die_offset to get the absolute offset for
	the die reference.
	(die_containing_type):  New function to build type from
	DW_AT_containing_type attribut.
	(read_type_die):  Handle DW_TAG_ptr_to_member_type.
	Treat DW_TAG_subprogram like DW_TAG_subroutine_type.
	(dwarf_base_type):  Fix typo with creation of FT_UNSIGNED_SHORT
	fundamental type.
	(create_name):  Removed, symbol name allocation is now done
	in new_symbol.
	(dump_die):  Use print_address_numeric to print a CORE_ADDR.
	(dwarf2_empty_die_ref_table):  New function to clear the die
	reference table.
	(dwarf2_get_ref_die_offset):  New function to get the absolute
	die offset from a die reference attribute.
	(decode_locdesc):  Complete rewrite using a stack, code mostly
	borrowed from dwarfread.c:locval.
	(dwarf_alloc_type):  Removed, replaced by direct calls to alloc_type.
	(dwarf_alloc_block):  Allocate block on temporary obstack.

	* elfread.c (elf_symtab_read):  When handling Irix dynamic symbols,
	skip section name symbols and relocate all others.
	(elf_symfile_read):  Build dwarf2 psymtab even if offset is non-zero.

	* irix5-nat.c (fetch_core_registers):  Handle core_reg_sect
	from N32 executables. Call registers_fetched after extracting
	the registers.
	(obj_list_variant, struct link_map, LM_OFFSET, LM_ADDR):  New
	definitions to enable support of O32 and N32 format objlists.
	(struct so_list):  New members offset, so_name and lmstart to
	eliminate dependencies from the objlist format used.
	(solib_map_sections, symbol_add_stub, solib_add,
	info_sharedlibrary_command, solib_address, clear_solib):  Use
	so_name and LM_OFFSET.
	(first_link_map_member):  Rewrite to enable support of O32 and N32
	format objlists.
	(next_link_map_member, xfer_link_map_member):  New functions to
	support O32 and N32 format objlists.
	(find_solib):  Use first_link_map_member, next_link_map_member and
	xfer_link_map_member.
	(solib_create_inferior_hook):  Use TARGET_SIGNAL_* instead of
	host signal numbers.

	* mdebugread.c (parse_partial_symbols, handle_psymbol_enumerators):
	Pass CORE_ADDR variant to add_psymbol_to_list.

	* mips-tdep.c (heuristic_proc_desc):  Stop examining the prologue
	if we encounter a positive stack adjustment. Handle `move $30,$sp'.
	Handle `sd reg,offset($sp)' for 32 bit ABIs.

	* symmisc.c (dump_msymbols, print_partial_symbols):  Use
	print_address_numeric to print a SYMBOL_VALUE_ADDRESS.
	(dump_symtab):  Print compilation directory if it is not NULL.

	* valops.c (search_struct_field, value_struct_elt_for_reference):
	Use SYMBOL_VALUE_ADDRESS instead of SYMBOL_BLOCK_VALUE to get the
	address of a static member.
1996-12-01 08:33:39 +00:00
Peter Schauer 73b8e6a915 * irix5-nat.c, osfsolib.c, solib.c (symbol_add_stub): Handle
missing or zero-sized .text sections properly.
	* mdebugread.c:  Handle scRConst and scSUndefined storage classes.
	* stabsread.c (scan_file_globals):  Try to resolve symbols
	for shared libraries from the minimal symbol table of the main
	executable first.
1996-11-02 11:59:19 +00:00
Fred Fish 948a9d9233 * alpha-nat.c (fetch_core_registers): Match Sep 4 gdbcore.h prototype
change for core_read_registers in struct core_fns.
	* core-regset.c (fetch_core_registers): Ditto & add prototype.
	* core-sol2.c (fetch_core_registers): Ditto & add prototype.
	* i386aix-nat.c (fetch_core_registers): Ditto & add prototype.
	* i386b-nat.c (fetch_core_registers): Ditto.
	* i386mach-nat.c (fetch_core_registers): Ditto & add prototype.
	* irix4-nat.c (fetch_core_registers): Ditto.
	* irix5-nat.c (fetch_core_registers): Ditto.
	* lynx-nat.c (fetch_core_registers): Ditto & add prototype.
	* m68knbsd-nat.c (fetch_core_registers): Ditto.
	* mips-nat.c (fetch_core_registers): Ditto & add prototype.
	* rs6000-nat.c (fetch_core_registers): Ditto.
	* sparc-nat.c (fetch_core_registers): Ditto.
	* sun3-nat.c (fetch_core_registers): Ditto & add prototype.
	* ultra3-nat.c (fetch_core_registers): Ditto & add prototype.

	* alpha-nat.c (register_addr): Match Sep 4 gdbcore.h prototype change.
	* delta68-nat.c (register_addr): Ditto.
	* gdbserver/low-linux.c (register_addr): Ditto.
	* gdbserver/low-hppabsd.c (register_addr): Ditto.
	* i386m3-nat.c (register_addr): Ditto.
	* mips-nat.c (register_addr): Ditto.
	* ultra3-nat.c (register_addr): Ditto.
1996-09-09 03:01:49 +00:00
Fred Fish 857dcde8c2 * config/mips/nm-mips.h (get_longjmp_target): Add prototype.
* config/mips/nm-irix3.h (get_longjmp_target): Add prototype.
	* remote-mips.c (mips_read_processor_type): Remove prototype.
	* mips-tdep.c (gdb_print_insn_mips): Add prototype and make static.
	* irix5-nat.c (fetch_core_registers): Add prototype.
1996-08-14 08:46:24 +00:00
Jeff Law 87273c713f * symfile.c (auto_solib_add): Renamed from auto_solib_add_at_startup.
All references changed.
        * breakpoint.c (bpstat_what): Add shlib_event to the class types.
        Update state table.  Reformat so that it's still readable.
        When we hit the shlib_event breakpoint, set the calss of shlib_event.
        (breakpoint_1): Add "shlib events" as a breakpoint type.
        Print the shlib_event breakpoint like other breakpoints.
        (create_solib_event_breakpoint): New function.
        (breakpoint_re_set_one): Handle solib_event breakpoints.
        * breakpoint.h (enum bytype): Add bp_shlib_event breakpoint type.
        (enum bpstat_what_main_action): Add BPSTAT_WHAT_CHECK_SHLIBS
        action.
        (create_solib_event_breakpoint): Declare.
        * infrun.c (wait_for_inferior): Handle CHECK_SHLIBS bpstat.
        (normal_stop): Inform the user when the inferior stoped due
        to a shared library event.
        (_initialize_infrun): Add new set/show variable "stop_on-solib-events"
        to control whether or not gdb continues the inferior or stops it when
        a shared library event occurs.
        * minsyms.c (lookup_minimal_symbol_solib_trampoline): New function.
        * somsolib.c (TODO list): Update.
        (som_solib_create_inferior_hook): Arrange for gdb to be notified
        when significant shared library events occur.
        * hppa-tdep.c (find_unwind_entry): No longer static.
First cut at the machine independent changes for 7363.  Also includes
code to automatically track shl_load/shl_unload calls on hpux.
1996-01-23 21:06:34 +00:00
Fred Fish a1df8e780c * coredep.c: Renamed to core-aout.c
* core-svr4.c: Renamed to core-regset.c
	* Makefile.in (ALLDEPFILES): Account for renamings.
	* corelow.c (core_file_fns): Add, points to chain of structs.
	(add_core_fns): New function to build chain of structs.
	(get_core_registers): Modify to search core functions chain and call
 	appropriate fetch_core_registers function based on core file flavour.
	* gdbcore.h (fetch_core_registers):  Remove declaration.
	(struct core_fns): Define struct for core function info.
	* i386m3-nat.c: Update comment for filename change (coredep->core-aout)
	* a68v-nat.c (fetch_core_registers): Remove stub, not needed now.
	* alpha-nat.c (fetch_core_registers): Make static.
	(alpha_core_fns, _initialize_core_alpha): New struct and func.
	* core-aout.c (fetch_core_registers): Make static
	(aout_core_fns, _initialize_core_aout): New struct and func.
	* core-regset.c (fetch_core_registers): Make static.
	(regset_core_fns, _initialize_core_regset): New struct and func.
	* core-sol2.c (fetch_core_registers): Make static.
	(solaris_core_fns, _initialize_core_solaris): New struct and func.
	* hp300ux-nat.c (fetch_core_registers): Make static.
	(hp300ux_core_fns, _initialize_core_hp300ux): New struct and func.
	* i386aix-nat.c (fetch_core_registers): Make static.
	(i386aix_core_fns, _initialize_core_i386aix): New struct and func.
	* i386mach-nat.c (fetch_core_registers: Make static.
	(i386mach_core_fns, _initialize_core_i386mach): New struct and func.
	* irix4-nat.c (fetch_core_registers): Make static.
	(irix4_core_fns, _initialize_core_irix4): New struct and func.
	* irix5-nat.c (fetch_core_registers):
	(irix5_core_fns, _initialize_core_irix5): New struct and func.
	* lynx-nat.c (fetch_core_registers): Make static.
	(lynx_core_fns, _initialize_core_lynx): New struct and func.
	* mips-nat.c (fetch_core_registers): Make static.
	(mips_core_fns, _initialize_core_mips): New struct and func.
	* ns32km3-nat.c (fetch_core_registers): Remove stub.
	* rs6000-nat.c (fetch_core_registers): Make static.
	(rs6000_core_fns, _initialize_core_rs6000): New struct and func.
	* sparc-nat.c (fetch_core_registers): Make static.
	(sparc_core_fns, _initialize_core_sparc): New struct and func.
	* sun3-nat.c (fetch_core_registers):
	(sun3_core_fns, _initialize_core_sun3): New struct and func.
	* sun386-nat.c (fetch_core_registers): Remove stub.
	* ultra3-nat.c (fetch_core_registers): Make static.
	(ultra3_core_fns, _initialize_core_ultra3): New struct and func.
	* config/gould/pn.mh (XDEPFILES),
 	config/i386/fbsd.mh (NATDEPFILES),
	config/i386/i386bsd.mh (NATDEPFILES),
 	config/i386/i386m3.mh (XDEPFILES),
	config/i386/i386sco.mh (NATDEPFILES),
	config/i386/i386sco4.mh (NATDEPFILES),
	config/i386/i386v.mh (NATDEPFILES),
	config/i386/i386v32.mh (NATDEPFILES),
	config/i386/nbsd.mh (NATDEPFILES),
	config/i386/ptx.mh (XDEPFILES),
	config/i386/ptx4.mh (XDEPFILES),
	config/i386/symmetry.mh (NATDEPFILES),
	config/m68k/3b1.mh (XDEPFILES),
	config/m68k/cisco.mt (TDEPFILES),
	config/m68k/delta68.mh (NATDEPFILES),
	config/m68k/dpx2.mh (NATDEPFILES),
	config/m68k/hp300bsd.mh (NATDEPFILES),
	config/m68k/hp300hpux.mh (NATDEPFILES),
	config/m68k/isi.mh (XDEPFILES),
	config/m68k/news.mh (NATDEPFILES),
	config/m68k/news1000.mh (XDEPFILES),
	config/m88k/cxux.mh (NATDEPFILES),
	config/m88k/delta88.mh (NATDEPFILES),
	config/mips/littlemips.mh (XDEPFILES),
	config/mips/mipsm3.mh (XDEPFILES),
	config/ns32k/merlin.mh (XDEPFILES),
	config/ns32k/nbsd.mh (NATDEPFILES),
	config/ns32k/ns32km3.mh (NATDEPFILES),
	config/pa/hppabsd.mh (NATDEPFILES),
	config/pa/hppahpux.mh (NATDEPFILES),
	config/romp/rtbsd.mh (XDEPFILES),
	config/tahoe/tahoe.mh (XDEPFILES),
	config/vax/vaxbsd.mh (XDEPFILES),
	config/vax/vaxult.mh (NATDEPFILES),
	config/vax/vaxult2.mh (NATDEPFILES),
	Account for coredep.o to core-aout.o name change.
	* config/i386/i386dgux (NATDEPFILES),
	config/i386/i386sol2.mh (NATDEPFILES),
	config/i386/i386v4.mh (NATDEPFILES),
	config/i386/linux.mh (NATDEPFILES),
	config/i386/ncr3000.mh (NATDEPFILES),
	config/m68k/m68kv4.mh (NATDEPFILES),
	config/m88k/delta88v4.mh (NATDEPFILES),
	config/mips/mipsv4.mh (NATDEPFILES),
	Account for core-svr4.o to core-regset.o name change.
1996-01-11 20:08:15 +00:00
Peter Schauer f2ebb24d94 * irix5-nat.c, osfsolib.c (solib_address): Return the name of the
containing solib.
1995-11-19 13:31:52 +00:00
Peter Schauer 2e11fdd8f8 * annotate.c (annotate_source, annotate_frame_begin): Issue
`0x' prefix for the pc value, to remain consistent with previous
	GDB versions.

	* blockframe.c (find_pc_partial_function), config/pa/tm-hppa.h:
	Remove Sun shared library transfer hack and
	INHIBIT_SUNSOLIB_TRANSFER_TABLE_HACK, it is obsoleted by the
	mst_solib_trampoline minimal symbols.

	* blockframe.c (inside_main_func):  Check main_func_*pc against
	INVALID_ENTRY_*PC, not zero.
	* symfile.c (init_entry_point_info):  Initialize ei.*pc with
	INVALID_ENTRY_*PC.
	* mipsread.c (mipscoff_symfile_read):  If the entry_file bounds
	are still unknown after processing the partial symbols, then try
	to set them from the minimal symbols.

	* infcmd.c (registers_info):  Error out if selected_frame is NULL.
	* stack.c (return_command):  Select new current frame silently if
	not interactive.

	* mipsread.c (read_alphacoff_dynamic_symtab):  Ignore additional
	DT_MIPS_LOCAL_GOTNO and DT_MIPS_GOTSYM entries.

	* irix5-nat.c (solib_create_inferior_hook):  Call solib_add only
	if auto_solib_add_at_startup is nonzero.
	(_initialize_solib):  Add "set auto-solib-add" command.
	* osfsolib.c (solib_create_inferior_hook):  Call solib_add only
	if auto_solib_add_at_startup is nonzero.
	(_initialize_solib):  Add "set auto-solib-add" command.
1995-11-18 12:19:25 +00:00
Brendan Kehoe 811f1bdce6 * regex.h: Renamed to gnu-regex.h.
* regex.c: Renamed to gnu-regex.c.
	* Makefile.in (POSSLIBS): Refer to gnu-regex.h and gnu-regex.c.
	(REGEX, REGEX1): Change to gnu-regex.o instead of regex.o.
	(regex.o): Renamed to gnu-regex.o; refer to gnu-regex.c.
	(irix5-nat.o, osfsolib.o, gnu-regex.o, solib.o, source.o, symtab.o):
	Likewise.
	* irix5-nat.c, osfsolib.c, gnu-regex.c, solib.c, source.c, symtab.c):
	Include "gnu-regex.h" instead of "regex.h".
	* alpha-tdep.c (in_prologue): Rename to alpha_in_prologue, to
	avoid conflicts with symtab.h.

fixes building gdb under OSF/1 4.0
1995-10-26 23:54:44 +00:00
Jeff Law 148070cca4 * corelow.c (core_open): Don't update the to_sections and
to_sections_end fields in core_ops here.  It's too late.
        * irix5-nat.c (solib_add): Update the to_sections and
        to_sections_end fields in core_ops here if needed.
        * osfsolib.c (solib_add): Likewise.
        * rs6000-nat.c (xcoff_reload_core): Likewise.
        * solib.c (solib_add): Likewise.
        * somsolib.c (solib_add): Likewise.
1995-10-12 23:26:06 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
J.T. Conklin 2b57629364 * configure.in: Check for working mmap, ansi headers, string.h,
strings.h, and memory.h.
* configure: Regenerated.

* gdb_stat.h: New file, "portable" <sys/stat.h>.
* gdb_string.h: New file, "portable" <string.h>.

* altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c,
convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c,
gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c,
i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c,
mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c,
rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c,
symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c,
ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h"
instead of <sys/stat.h>.

* alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c,
ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c,
core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c,
dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c,
exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c,
fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c,
inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c,
m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c,
monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c,
printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c,
remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c,
remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c,
remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c,
remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c,
remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c,
solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c,
symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c,
valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include
"gdb_string.h" instead of <string.h>.
* gdbtk.c: Likewise.

* config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h,
sparc/xm-sun4os4.h (HAVE_MMAP): Removed.

* config/xm-lynx.h, config/i386/xm-ptx.h,
config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h,
config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/mips/xm-news-mips.h, config/mips/xm-riscos.h,
config/pa/hppah.h, config/rs6000/xm-rs6000.h,
config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h,
config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h,
config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed.
* config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-08-01 20:14:27 +00:00
Peter Schauer 3f403f6ab3 * alpha-nat.c, irix4-nat.c, irix5-nat.c, mipsv4-nat.c,
sparc-tdep.c (supply_gregset, supply_fpregset):  Fill inaccessible
	registers with zero to handle recent read_register_bytes change.
	* irix4-nat.c, irix5-nat.c, mipsv4-nat.c (supply_gregset,
	fill_gregset):  Fix handling of CAUSE_REGNUM.
	* mips-nat.c (store_inferior_registers):  Handle unwritable
	registers when storing a single register.
	* config/mips/tm-irix3.h (CAUSE_REGNUM, BADVADDR_REGNUM):
	Fix definitions.

	* mdebugread.c (parse_symbol, psymtab_to_symtab_1):  Clear
	allocated mips_extra_func_info, if the debug info is corrupt,
	the PDR to fill it in might be missing.
1995-03-28 06:57:39 +00:00
Stan Shebs faf4dcd7f3 * irix5-nat.c (string.h): Include near beginning of file. 1995-02-12 22:59:44 +00:00
Jim Kingdon 2d336b1b51 * config/sparc/tm-sun4sol2.h, dbxread.c: Rename
N_SO_ADDRESS_MAYBE_MISSING to SOFUN_ADDRESS_MAYBE_MISSING.
	* symtab.h (minimal_symbol) [SOFUN_ADDRESS_MAYBE_MISSING]: Add
	filename field.
	* elfread.c (record_minimal_symbol_and_info),
	minsyms.c, symtab.h (prim_record_minimal_symbol_and_info): Return
	newly created symbol.
	* elfread.c (elf_symtab_read) [SOFUN_ADDRESS_MAYBE_MISSING]:
	Set filename field of minimal symbol.
	* symmisc.c (dump_msymbols) [SOFUN_ADDRESS_MAYBE_MISSING]:
	Print filename field.
	* minsyms.c, symtab.h (lookup_minimal_symbol): New arg sfile.
	* symm-tdep.c, somsolib.c, hppa-tdep.c, c-exp.y, f-exp.y,
	m2-exp.y, nindy-tdep.c, m3-nat.c, irix5-nat.c, hpread.c,
	os9kread.c, breakpoint.c, alpha-tdep.c, valops.c, symtab.c,
	printcmd.c, dbxread.c: Change callers to pass NULL for sfile.
	* dbxread.c (process_one_symbol) [SOFUN_ADDRESS_MAYBE_MISSING]:
	Find address of function from minimal symbols.
	* partial-stab.h, case 'f', 'F': Call find_stab_function_addr
	instead of getting pst->textlow from the stab.
	* minsyms.c (find_stab_function_addr): New function.
1995-02-09 07:00:45 +00:00
Jim Kingdon 9de0904cce * symfile.c (reread_symbols): Include bfd_errmsg string in error
message if bfd_close fails.
	* exec.c (exec_close), solib.c (clear_solib), corelow.c
	(core_close), objfiles.c (free_objfile), irix5-nat.c
	(clear_solib), osfsolib.c (clear_solib), remote-utils.c
	(gr_load_image): Check for errors from bfd_close.
	* solib.c (look_for_base), remote-utils.c (gr_load_image),
	remote-udi.c (download), corelow.c (core_open), symfile.c
	(symfile_bfd_open), symfile.c (generic_load): Add comment
	regarding error from bfd_close.
	* remote-udi.c (download), remote-utils.c (gr_load_image): Add
	comment about bogus handling of errors from bfd_openr.
	* exec.c (exec_close): Add comment regarding memory leak and
	dangling reference to vp->name.
1994-10-15 18:28:35 +00:00
Peter Schauer 7621229598 Speed up GDB startup time by not demangling partial symbols.
* symfile.h (ADD_PSYMBOL_VT_TO_LIST),
	symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
	No longer demangle partial symbols.
	* symtab.c (lookup_symbol, list_symbols): Handle mangled
	variables, e.g. C++ static members, via the minimal symbols.

	Handle reordered functions in an objfile, for Irix 5.2 shared
	libraries.
	* objfiles.h (OBJF_REORDERED):  New bit in the objfile flags,
	set if the functions in an objfile are reordered.
	* mdebugread.c (parse_partial_symbols):  Detect reordered
	functions in an objfile.
	* symtab.c (find_pc_psymtab, find_pc_symtab):  Use expensive
	lookup algorithm if the functions in the objfile are reordered.

	* xcoffexec.c (exec_close):  If the current target has a copy
	of the exec_ops sections, reflect the freeing of the sections
	in current_target.

	* valops.c (call_function_by_hand):  Use `sizeof dummy1', not
	`sizeof dummy', for constructing the call dummy code.

	* config/sparc/tm-sparc.h:  Add PARAMS declarations to all
	function declarations.
	* sparc-tdep.c (sparc_pop_frame):  Cast result of
	read_memory_integer to CORE_ADDR when passing it to PC_ADJUST.

	* irix5-nat.c (enable_break):  Set breakpoint at the entry point
	of the executable, to handle the case where main resides in a
	shared library.
	* irix5-nat.c (solib_create_inferior_hook):  Reset stop_soon_quietly
	after shared library symbol reading, to get rid of a warning from
	heuristic_proc_start if the startup code has no symbolic debug info.

	* breakpoint.h (struct breakpoint):  Add new fields language
	and input_radix, to enable breakpoint resetting with the
	proper language and radix.
	* breakpoint.c (set_raw_breakpoint):  Initialize them.
	(breakpoint_re_set_one):  Use them when resetting the breakpoint.
	(breakpoint_re_set):  Preserve current language and input_radix
	across breakpoint_re_set_one calls.

	* symtab.c (decode_line_1):  Do not build a canonical line
	specification for `*expr' line specifications.

	* breakpoint.h (bpstat_stop_status):  Fix prototype declaration.
1994-10-08 11:54:29 +00:00