Commit Graph

9694 Commits

Author SHA1 Message Date
Jeff Law
fdafbfad9e * hppa-tdep.c (skip_prologue): Return "pc" not zero
if no unwind descriptor is found.
1994-03-25 18:48:24 +00:00
Jeff Law
eb1167c65c * tm-hppa.h (NUM_REGS): Bump to 128 registers.
(REGISTER_NAMES): Add entries for "right-half" of FP registers.
        (REGISTER_RAW_SIZE, MAX_REGISTER_RAW_SIZE): Do not treat FP regs
        differently.  All registers are four bytes.
        (REGISTER_BYTES, REGISTER_BYTE): Simplify now that all registers are
        the same size.
        (REGISTER_VIRTUAL_TYPE): Use builtin_type_float for all FP regs.

        * hppa-tdep.c (pa_print_fp_reg): Update to print even numbered FP
        registers as both single and double values (fetching 2nd 32bit half
        as necessary).  Annotate each register printed with its precision.
1994-03-25 18:21:49 +00:00
Jeff Law
c8f75fe857 * paread.c (read_unwind_info): Fix off-by-one error. 1994-03-25 18:15:10 +00:00
Jim Kingdon
0c1af47ff0 * main.c (complete_command): Deal with it if arg is NULL. 1994-03-25 16:39:05 +00:00
Ken Raeburn
11d7c06453 * config/tc-alpha.c (alpha_ip): Only set GP prolog size if using PV register.
(T12): New macro.
(emit_insn): New function.
(md_assemble): Call it.
(alpha_force_relocation): Handle BFD_RELOC_26, for call_pal instructions.
(lituse_pending): New variable.  Set by anything that generates a LITERAL
reloc, cleared by anything that generates a LITUSE reloc, tested by code that
might want to emit a LITUSE reloc.
(emit_unaligned_io): New function.  Currently calls md_assemble, but it should
eventually be converted to generate the insn itself and call emit_insn directly.
(emit_load_unal, emit_store_unal, emit_byte_manip_r, emit_extract_r,
emit_insert_r, emit_mask_r, emit_sign_extend, emit_bis_r): Likewise.
(alpha_ip, case 'I'): Handle with BFD_RELOC_23.
(alpha_ip, label get_macro): Don't emit the final instruction if the opcode is
zero.
(alpha_ip, case 'B', subcase 'd'): New case, for subword and unaligned memory
access macros.
(md_apply_fix): Handle BFD_RELOC_26.  Generate an error message if the value
can't be resolved.
1994-03-25 02:39:19 +00:00
Jim Kingdon
4df6dcd10d * config/mips/tm-mips.h (SETUP_ARBITRARY_FRAME): Revise comment
regarding using the PC--using the PC is necessary and all the
	FIXME comments in the world won't make it go away.
1994-03-25 01:38:24 +00:00
Stu Grossman
27847c6f99 Netware debugger stub NLM. 1994-03-25 01:38:12 +00:00
Ian Lance Taylor
193c5f93a1 * ldlang.c (new_afile): Add new argument add_to_list. Don't set
real to true for lang_input_file_is_marker_enum.  Clear the_bfd.
	(lang_add_input_file): Pass true to new_afile for add_to_list.
	(lookup_name): Remove force_load argument.  Changed all callers.
	Pass false to new_afile for add_to_list.  Split loading of symbols
	out into separate function.
	(load_symbols): New function split out of lookup_name.  Don't load
	the symbols if they are already loaded.
	(open_input_bfds): For lang_input_statement_enum call load_symbols
	rather than lookup_name.
	(lang_process): Pass abs_output_section rather than NULL to
	lang_size_sections.
	(lang_startup): Set real field of first_file to true.
1994-03-24 20:25:12 +00:00
Steve Chamberlain
47e70c5417 Thu Mar 24 11:33:46 1994 Steve Chamberlain (sac@jonny.cygnus.com)
* coff-h8300.c (h8300_reloc16_extra_cases): Add relaxing info
	for 16bit relative branches.
	* coff-h8500.c (r_high8, r_low16, r_high16): Don't complain on
	overflow.
1994-03-24 19:45:23 +00:00
Jim Kingdon
2f3b7d8eb5 * valops.c (value_at, value_at_lazy): Give error if we dereference
a pointer to void.
	* gdbtypes.h: Fix comments regarding TYPE_CODE_VOID.
	* stabsread.c: Use 1, not 0, for TYPE_LENGTH of void types.
1994-03-24 18:32:31 +00:00
Jeff Law
9d7f682f8c * som.c (som_bfd_prep_for_ar_write): Ignore non-SOM objects.
(som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
1994-03-24 17:21:50 +00:00
David Edelsohn
18d94a58c0 (NM_FOR_TARGET): Build tree version is now nm.new. 1994-03-24 17:18:34 +00:00
Jim Kingdon
553e18620a * stabsread.c (patch_block_stabs): Add comment about what happens
if the definition is in another compilation unit from the stab.
1994-03-24 17:03:23 +00:00
Jim Kingdon
b93e563cb7 * TODO: Add suggestions for static member function tests, and
completion tests.
1994-03-24 16:26:57 +00:00
Jim Kingdon
184d260bdf Update for Things-to-lose and lose_these_too. 1994-03-24 16:25:47 +00:00
Jim Kingdon
8816824a83 * stabs.texinfo (Global Variables): Talk about stabs in files
where variables are referenced, but not defined.
1994-03-24 16:11:11 +00:00
Jim Kingdon
acdec9542b * stabsread.c (patch_block_stabs): Don't create LOC_OPTIMIZED_OUT
symbols.  Reverts change of 2 Apr 1993.
1994-03-24 15:32:42 +00:00
Jim Kingdon
5801f3488e * dbxread.c (end_psymtab): Add comment about empty psymtabs. 1994-03-24 15:12:40 +00:00
Jim Kingdon
0997322359 * main.c (complete_command): New command, from Rick Sladkey
<jrs@world.std.com>.
	(symbol_completion_function): Don't declare rl_point and
	rl_line_buffer; they are now declared in readline.h.
	(show_commands): Don't declare history_base; it is declared in
	history.h.
	* command.c (lookup_cmd): Don't delete trailing whitespace.
1994-03-24 15:00:52 +00:00
Stu Grossman
ad15bea9df * minsyms.c (prim_record_minimal_symbol): Move section deduction
code from prim_record_minimal_symbol_and_info() to here.  Callers
	of the latter can legitimately supply a section number of -1.
1994-03-24 00:20:53 +00:00
Stan Shebs
d12a71cabb Updated list of keep-* options. 1994-03-23 23:52:06 +00:00
David MacKenzie
1f1ed32d6d * netbsd386.c (N_SET_FLAGS): Delete the old definition. 1994-03-23 22:30:14 +00:00
Stan Shebs
ea936fd77b MPW config stuff for GDB. 1994-03-23 22:25:00 +00:00
Stan Shebs
698ce51f3f Thu Mar 10 15:51:40 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-xconfig.in: New file, mips-targeting config fragment.
	* mpw-init.c: New file, MPW x mips version of init.c.
1994-03-23 22:17:53 +00:00
Stan Shebs
d1bcda6791 Sanitization for MPW and GM additions. 1994-03-23 22:16:54 +00:00
Stan Shebs
8dc3e3d71f Thu Mar 10 15:49:05 1994 Stan Shebs (shebs@andros.cygnus.com)
* mpw-config.in: New file, MPW configuration fragment.
	* mpw-make.in: New file, MPW makefile fragment.
	* config/m68k/xm-mpw.h: New file, MPW host definitions.
	* ser-mac.c: New file, Mac serial interface.
1994-03-23 22:14:11 +00:00
Stan Shebs
4ce336af5a Simplification of GM-specific config bits. 1994-03-23 20:41:47 +00:00
Ian Lance Taylor
456961d1bc Clean up the relaxing code for the new linker.
* targets.c (_bfd_relax_section): Take boolean *again argument
	rather than asymbol list.
	* bfd.c (bfd_relax_section): Change name of fourth argument from
	symbols to again.
	* reloc.c (bfd_generic_relax_section): Take boolean *again
	argument rather than asymbol list.  Always return true.
	* bout.c: Include genlink.h.
	(aligncode, perform_slip): Declare.
	(perform_slip): Take BFD argument rather than asymbol list.
	Changed all callers.  Get the symbols from the BFD.  Change the
	hash table entry value as well as the symbol value.
	(abs32code): Take BFD argument rather than asymbol list.  Changed
	all callers.
	(aligncode): Likewise.
	(b_out_relax_section): Take boolean *again argument rather than
	asymbol list.  Only return false if an error occurred.  Set *again
	to false.  Get symbols from BFD.
	* reloc16.c: Include genlink.h.
	(bfd_perform_slip): Take BFD argument rather than asymbol list.
	Get the symbols from the BFD.  Change the hash table entry value
	as well as the symbol value.
	(bfd_coff_reloc16_relax_section): Take boolean *again argument
	rather than asymbol list.  Only return false if an error occurred.
	Set *again to false.  Get symbols from BFD.
	* coffcode.h (bfd_coff_backend_data): Change
	_bfd_coff_reloc16_estimate to take BFD argument rather than
	asymbol list.
	(bfd_coff_reloc16_estimate): Corresponding change.
	(dummy_reloc16_estimate): Corresponding change.
	* libcoff-in.h (bfd_coff_reloc16_relax_section): Change
	declaration to take boolean * rather than asymbol list.
	(bfd_perform_slip): Change declaration to take BFD rather than
	asymbol list.
	* coff-h8300.c (h300_reloc16_estimate): Take BFD argument rather
	than asymbol list.  Changed calls to bfd_perform_slip.
	* bfd-in2.h: Rebuilt.
	* libbfd.h: Rebuilt.
	* libcoff.h: Rebuilt.
	* Makefile.in: Rebuilt dependencies.
1994-03-23 20:21:06 +00:00
Ian Lance Taylor
a2670c2f8b * emultemp/gld960.em: Include libiberty.h
(gld960_before_parse): Pass NULL as final argument to concat.
1994-03-23 19:17:27 +00:00
Jim Kingdon
e552788b73 * gdbtypes.h, gdbtypes.c: Add comments regarding whether static
member functions have an element in args for a (nonexistent) this
	pointer.
1994-03-23 15:52:11 +00:00
Jim Kingdon
2b7ac6fdb0 * stabs.texinfo: Move stuff on @ and # type descriptors from node
Cplusplus to new nodes Member Type Descriptor and Method Type
	Descriptor.  Re-write stuff for #.
1994-03-23 15:18:17 +00:00
Jeff Law
0a64709eb4 * config/pa/tm-hppao.h (NO_PC_SPACE_QUEUE_RESTORE): Define.
* hppa-tdep.c (hppa_pop_frame): Do not restore the PC space
        queue if NO_PC_SPACE_QUEUE_RESTORE is defined.
1994-03-23 04:16:32 +00:00
Jeff Law
84ad95c118 * stabsread.c (REG_STRUCT_HAS_ADDR): Accept additional argument
for the structure's type.  All callers changed.

        * valops.c (call_function_by_hand): Check REG_STRUCT_HAS_ADDR
        for each structure argument rather than assuming it's either
        true or false for all structure arguments.

        * config/pa/tm-hppa.h (REG_STRUCT_HAS_ADDR): Depend only
        on the length structure passed, not the compiler used.

        * config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Accept additional
        argument for the structure's type.
1994-03-23 04:14:34 +00:00
Ian Lance Taylor
7dfa376e9b Handle .gpword and .cpadd only for SVR4_PIC, not != NO_PIC. Still
covered by last ChangeLog entry.
1994-03-23 00:43:48 +00:00
Jim Kingdon
51f8393319 * values.c (set_internalvar): Don't set var->value until we are
sure there won't be an error().
1994-03-23 00:34:44 +00:00
Ian Lance Taylor
f7a26f1b78 * scripttempl/aout.sc: Force _end and __end to be aligned to a
four byte boundary.
1994-03-22 23:46:17 +00:00
Jim Kingdon
29f2ceed48 * remote.c (get_offsets): Reinstate comment which was in
remote_wait about use of SECT_OFF_TEXT and so on.
1994-03-22 23:44:39 +00:00
Ian Lance Taylor
d9aba8051e * config/tc-mips.c (enum mips_pic_level): New enum.
(mips_pic): Change from int to enum mips_pic_level.  Change all
	uses (0 becomes NO_PIC, 2 becomes SVR4_PIC).
	(load_address): Handle EMBEDDED_PIC.
	(macro): Handle EMBEDDED_PIC in all PIC cases.
	(md_parse_option): Accept -membedded-pic to use EMBEDDED_PIC.  If
	OBJ_ELF, accept -KPIC and -call_shared to use SVR4_PIC and accept
	-non_shared to use NO_PIC (this is how the Irix 5 assembler
	works).  Do not permit -G with SVR4_PIC.
	(s_abicalls): Warn if -G was used, and force -G 0.
	(tc_gen_reloc): Set reloc->addend to 0 for a PC relative reloc for
	anything but a.out, not just for ELF.  For ECOFF, don't generate a
	BFD_RELOC_16_PCREL_S2 reloc unless using EMBEDDED_PIC.
1994-03-22 20:27:58 +00:00
Ian Lance Taylor
c031ba0b95 * coff-mips.c (mips_howto_table): Add entry for new MIPS_R_PCREL16
reloc, used in embedded PIC code.
	(mips_adjust_reloc_in): Change sanity check to permit new reloc.
	(mips_bfd_reloc_type_lookup): Turn BFD_RELOC_16_PCREL_S2 into
	MIPS_R_PCREL16.
1994-03-22 20:13:37 +00:00
Ian Lance Taylor
e1b5066f45 * config/obj-ecoff.h (obj_sec_sym_ok_for_reloc): Define to be 1. 1994-03-22 19:00:08 +00:00
Jeff Law
4b8250bda2 * gprof.c (funcsymbol): Use bfd_get_symbol_info instead of
bfd_decode_symclass.
1994-03-22 18:51:41 +00:00
Ian Lance Taylor
4335ce642d * linker.c (_bfd_generic_final_link): Set reloc_count to 0 before
counting relocs.  Set SEC_RELOC flag for any section which has
	relocs.

	* linker.c (_bfd_default_link_order): Handle bfd_data_link_order.

	* linker.c (_bfd_generic_link_add_symbols): Just call
	generic_link_add_symbols.
	(_bfd_generic_link_add_symbols_collect): New function, like
	_bfd_generic_link_add_symbols but also collect constructors and
	destructors by name as collect2 does.
	(generic_link_add_symbols): New function, like old
	_bfd_generic_link_add_symbols but with collect argument.
	(generic_link_add_object_symbols): Take collect argument.
	(generic_link_check_archive_element_no_collect): New function.
	(generic_link_check_archive_element_collect): New function.
	(generic_link_check_archive_element): Take collect argument.
	(generic_link_add_symbol_list): Take collect argument.
	(_bfd_generic_link_add_one_symbol): Rename constructor argument to
	collect.
	* libbfd-in.h (_bfd_generic_link_add_symbols_collect): Declare.
	* libbfd.h: Rebuilt.
1994-03-22 18:18:40 +00:00
Ian Lance Taylor
f3bc3ac3fa * ldwrite.c (build_link_order): Handle lang_data_statement_enum by
building a bfd_data_link_order, rather than by setting the section
	contents immediately.
1994-03-22 18:18:32 +00:00
Jeff Law
9d92fe0af4 * archive.c (bfd_construct_extended_name_table): Use ar_padchar
for first character in an extended name.
        (_bfd_write_archive_contents): If ar_padchar == '/', then use
        "//" as the name of the special archive member holding the
        extended name table.
1994-03-22 18:04:59 +00:00
Ian Lance Taylor
f1cca64780 Support for link_order types which generate relocs in order to
support -Ur in the linker.
	* linker.c (generic_link_add_symbol_list): Remove bitsize argument
	from call to _bfd_generic_link_add_one_symbol.
	(_bfd_generic_link_add_one_symbol): Remove bitsize argument.
	Don't pass bitsize to constructor call back.  Pass BFD_RELOC_CTOR
	instead of bitsize to add_to_set call back.
	(_bfd_generic_final_link): Account for link_order relocs when
	allocating space for relocations.  Handle them in link_order loop.
	(_bfd_generic_reloc_link_order): New function.
	(_bfd_default_link_order): If a reloc_link_order is seen here,
	abort.
	(_bfd_count_link_order_relocs): New function.
	* libbfd-in.h (_bfd_generic_link_add_one_symbol): Remove bitsize
	argument from declaration.
	(_bfd_generic_reloc_link_order): Declare.
	(_bfd_count_link_order_relocs): Declare.
	* libbfd.h: Rebuilt.
	* aoutx.h (aout_link_add_symbols): Remove bitsize argument from
	call to _bfd_generic_link_add_one_symbol.
	(NAME(aout,final_link)): Account for link_order relocs when
	allocating space for relocations.  Handle them after handling all
	input BFDs.
	(aout_link_reloc_link_order): New function.
	* ecoff.c (ecoff_link_add_externals): Remove bitsize argument from
	call to _bfd_generic_link_add_one_symbol.
	(ecoff_bfd_final_link): Account for link_order relocs when
	allocating space for relocations.  Handle them in link_order loop.
	(ecoff_link_write_external): Set the storage class of a defined
	linker created symbol based on the section it is in.  Correct
	bfd_link_hash_weak case to use .sc rather than .st.
	(ecoff_reloc_link_order): New function.
	* coff-alpha.c (alpha_bfd_reloc_type_lookup): Handle
	BFD_RELOC_CTOR.
	* coff-mips.c (mips_bfd_reloc_type_lookup): Likewise.
1994-03-22 00:27:05 +00:00
Ian Lance Taylor
4fdbafb247 Changes to make -Ur work again.
* ldmain.c (add_to_set): Now takes reloc argument rather than
	bitsize.  Check config.build_constructors here.  If an new hash
	table entry is created, mark it as undefined.
	(constructor_callback): No longer takes bitsize argument.  Pass
	BFD_RELOC_CTOR to ldctor_add_set_entry, but first make sure the
	BFD backend supports it.
	(reloc_overflow): Handle a NULL abfd argument.
	(reloc_dangerous, unattached_reloc): Likewise.
	* ldctor.c: Include ldmain.h.
	(struct set_info): Change bitsize field to reloc.
	(ldctor_add_set_entry): Now takes reloc argument rather than
	bitsize.  Don't bother to check config.build_constructors here.
	(ldctor_build_sets): Get the size from the reloc howto.  If
	generating relocateable output, call lang_add_reloc rather than
	lang_add_data.
	* ldctor.h (ldctor_add_set_entry): Change declaration to use reloc
	instead of bitsize.
	* ldlang.h (statement_enum): Add lang_reloc_statement_enum.
	(lang_reloc_statement_type): New structure.
	(lang_statement_union_type): Add reloc_statement field.
	(lang_add_reloc): Declare new function.
	* ldlang.c (lang_for_each_statement_worker): Handle
	lang_reloc_statement_enum.
	(map_input_to_output_sections, print_statement): Likewise.
	(lang_size_sections, lang_do_assignments): Likewise.
	(print_reloc_statement): New function.
	(lang_add_reloc): New function.
	* ldwrite.c (build_link_order): Handle lang_reloc_statement_enum.
1994-03-22 00:24:13 +00:00
Ian Lance Taylor
651d2da7f6 * bfdlink.h (struct bfd_link_callbacks): Change bitsize argument
to add_to_set to reloc.  Remove bitsize argument from constructor.
	Comment that reloc_overflow, reloc_dangerous and unattached_reloc
	must handle NULL pointers for reloc location.
	(enum bfd_link_order_type): Add bfd_section_reloc_link_order and
	bfd_symbol_reloc_link_order.
	(struct bfd_link_order): Add reloc field to union.
	(struct bfd_link_order_reloc): Define.
1994-03-22 00:21:38 +00:00
Peter Schauer
388f491940 * config/i386/tm-i386aix.h, config/i386/tm-sun386.h,
config/i386/tm-symmetry.h (REGISTER_CONVERT_TO_RAW):  Fix typo.
	* config/i386/tm-symmetry.h:  Make comment inside #if 0 a real
	comment.
	* config/i386/tm-symmetry.h (STORE_STRUCT_RETURN):  Cast argument
	to write_memory to avoid warnings from gcc.
	* config/i386/xm-symmetry.h:  Add missing #endif.
	* config/i386/nm-symmetry.h (NO_PTRACE_H):  Add for Dynix.
	* config/i386/symmetry.mt (TDEPFILES):  Add i386-tdep.o.
	* config/i386/symmetry.mh (NAT_FILE, NATDEPFILES):  Add.
1994-03-21 21:16:16 +00:00
Peter Schauer
71c33ef7d4 * symmisc.c (maintenance_check_symtabs): New function to check
consistency of psymtabs and symtabs.
	* symtab.h (maintenance_check_symtabs):  Add prototype.
	* maint.c:  Add new `maint check-symtabs' command.
1994-03-21 21:14:27 +00:00
Stu Grossman
72bba93b85 Mon Mar 21 11:02:51 1994 Stu Grossman (grossman at cygnus.com)
* alpha-tdep.c:  Gobs of changes (many imported from mips-tdep) to
	improve remote debugging efficiency.  Also fixed problems with
	doing function calls for programs with no entry points.
	* infcmd.c (run_stack_dummy):  Use CALL_DUMMY_ADDRESS instead of
	entry_point_address.
	* inferior.h (PC_IN_CALL_DUMMY):  ditto.
	* mdebugread.c (parse_symbol, parse_procedure, parse_external,
	parse_lines):  Pass section_offsets info to these routines so that
	we can relocate symbol table entries upon readin.
	* (psymtab_to_symtab_1):  Set symtab->primary to tell
	objfile_relocate to do relocations for our symbols.
	* (ecoff_relocate_efi):  New routine to relocate adr field of PDRs
	(which hang off of the symbol table).
	* Use prim_record_minimal_symbols_and_info instead of
	prim_record_minimal_symbols to supply section info to make minimal
	symbol relocations work.
	* minsyms.c (prim_record_minimal_symbols_and_info):  If section is
	-1, try to deduce it from ms_type.
	* objfiles.c (objfile_relocate):  Use ALL_OBJFILE_SYMTABS where
	appropriate.  Handle relocation of MIPS_EFI symbols special. Also,
	add code to relocate objfile->sections data structure.
	* remote.c (get_offsets):  Use new protocol message to acquire
	section offsets from the target.
	* (remote_wait):  Get rid of relocation stuff.  That's all handled
	by objfile_relocate now.
	* config/alpha/alpha-nw.mt (TM_FILE):  Use tm-alphanw.h.
	* config/alpha/tm-alpha.h:  Define CALL_DUMMY_ADDRESS, and
	VM_MIN_ADDRESS.
	* config/alpha/tm-alphanw.h:  DECR_PC_AFTER_BREAK=0, VM_MIN_ADDRESS=0.
1994-03-21 19:57:38 +00:00