Commit graph

12328 commits

Author SHA1 Message Date
Stu Grossman
6131622e34 * annotate.c, breakpoint.c, defs.h, gdbtk.c, top.c: Replace
enable/disable_breakpoint_hook with modify_breakpoint_hook.
	* gdbtk.c:  General cleanups, get rid of unused variables.  Redo
	handling of stdout/stderr to just return output as the result of
	the tcl command that caused the output.  Cleanup -Wall stuff.
	* (breakpoint_notify):  Now returns just action and breakpoint
	number.
	* (gdb_get_breakpoint_list):  New routine.  Does the obvious.
	* (gdb_get_breakpoint_info):  Mostly derived from the old
	breakpoint_notify, but returns lots more info.
	* (dsprintf_append_element):  Helper routine, works like printf,
	but appends a tcl element onto the specified DString.  Good for
	building up lists as return values.
	* (gdbtk_enable/disable_breakpoint):  Go away.  Replaced with
	gdbtk_modify_breakpoint.
	* (*many routines*):  Use new result protocol.
	* (call_wrapper):  Make sure that recursive calls don't trash results.
	* gdbtk.tcl:  New windows, autocmd, and breakpoints.
	* (gdbtk_tcl_fputs):  Don't use $current_output_win redirection
	anymore.  It's not needed (in fact, this routine may not be needed
	anymore).
	* (gdbtk_tcl_breakpoint):  Change to reflect new breakpoint
	notification protocol.
	* (gdbtk_tcl_busy gdbtk_tcl_idle):  Straighten out buttons, remove
	catches.
	* (interactive_cmd):  Use this wrapper around button invocations
	of many commands.  This will catch errors and put the results into
	the command window.  It also updates all the other windows.
	* Also, change reliefs of most things to sunken.  This actually
	looks better.
	* (create_file_win):  Fix margin binding to allow breakpoints to
	work again.
	* (create_asm_win):  Use return value of gdb_disassemble instead
	of implicit I/O to the command window.
	* (create_command_window):  Use new result protocol to get output
	from commands.
1995-02-15 01:45:39 +00:00
Ian Lance Taylor
a8e27cc684 * objdump.c (with_source_code): New global variable.
(usage): Mention -S/--source.
	(long_options): Add --source.
	(prev_functionname, prev_line): New static variables.
	(struct print_file_list): Define.
	(print_files): New static variable.
	(skip_to_line, show_line): New static functions.
	(disassemble_data): Call show_line to handle -l and -S.
	(main): Handle -S.
	* binutils.texi, objdump.1: Document -S/--source.
1995-02-14 23:07:21 +00:00
Ian Lance Taylor
580102b026 * elf32-mips.c (struct mips_elf_find_line): Define.
(mips_elf_find_nearest_line): New static function.
	(bfd_elf32_find_nearest_line): Define.
	* libelf.h (struct elf_obj_tdata): Add find_line_info field.

	* ecoff.c (_bfd_ecoff_swap_tir_in): Move to ecofflink.c.
	(_bfd_ecoff_swap_tir_out): Likewise.
	(_bfd_ecoff_swap_rndx_in): Likewise.
	(_bfd_ecoff_swap_rndx_out): Likewise.
	(cmp_fdrtab_entry): Likewise.
	(mk_fdrtab): Likewise.
	(lookup): Likewise.
	(_bfd_ecoff_find_nearest_line): Just call _bfd_ecoff_locate_line
	to do most of the work.  Allocate find_line_info if necessary.
	* ecofflink.c: Include "aout/stab_gnu.h".
	(_bfd_ecoff_swap_tir_in): Move in from ecoff.c.
	(_bfd_ecoff_swap_tir_out): Likewise.
	(_bfd_ecoff_swap_rndx_in): Likewise.
	(_bfd_ecoff_swap_rndx_out): Likewise.
	(cmp_fdrtab_entry): Likewise.  Use PTR instead of void *.
	(mk_fdrtab): Move in from ecoff.c.  Add debug_info, debug_swap,
	and line_info arguments, and use them instead of ecoff_data.
	(fdrtab_lookup): Move in from lookup in ecoff.c.  Remove abfd
	argument, add line_info argument.  Use it instead of ecoff_data.
	(_bfd_ecoff_locate_line): New function, mostly from the old
	_bfd_ecoff_find_nearest_line in ecoff.c.
	* libecoff.h (ecoff_data_type): Remove find_buffer, fdrtab_len and
	fdrtab fields, replacing them find_line_info field.
	(_bfd_ecoff_swap_tir_in): Declare.
	(_bfd_ecoff_swap_tir_out): Declare.
	(_bfd_ecoff_swap_rndx_in): Declare.
	(_bfd_ecoff_swap_rndx_out): Declare.
	* libbfd-in.h (_bfd_ecoff_locate_line): Declare.
	* libbfd.h: Rebuild.
	* configure.in: Don't use ecoff.o for bfd_elf32_bigmips_vec or
	bfd_elf32_littlemips_vec.
	* Makefile.in: Rebuild dependencies.
1995-02-14 23:03:45 +00:00
Jim Kingdon
5466f20ff2 * expression.h: Move declaration of evaluate_subexp_with_coercion
from here...
	* value.h: ...to here.
	* expression.h: Don't include value.h
1995-02-14 22:02:49 +00:00
Jim Kingdon
a686510408 * expression.h: Move include of value.h until after declaration of
enum exp_opcode.
1995-02-14 20:01:30 +00:00
Michael Meissner
8c9bfee312 Reconize old versions of the PowerPC machine code (EM_PPC_OLD and EM_CYGNUS_POWERPC). 1995-02-14 19:20:16 +00:00
Ian Lance Taylor
aed592693f * aoutf1.h (MACHTYPE_OK): Don't define if already defined. Don't
accept M_SPARC if bfd_arch_sparc is not in the list of supported
	architectures, and don't accept a 680x0 machine type if
	bfd_arch_m68k is not in the list of supported architectures.
	* aout0.c (MACHTYPE_OK): Define.
1995-02-14 17:49:30 +00:00
Ian Lance Taylor
1f9327360d * aoutx.h (NAME(aout,swap_ext_reloc_in)): Don't return a pointer
to garbage if the symbol index is out of range.
	(NAME(aout,swap_std_reloc_in)): Likewise.
1995-02-14 04:27:39 +00:00
Ian Lance Taylor
08b7351f06 * config/tc-sparc.h (tc_fix_adjustable): Define if OBJ_ELF.
* config/tc-sparc.c (md_apply_fix): If OBJ_ELF, subtract out the
	value of a defined symbol; the value was added in by
	fixup_segment.  This was previously corrected, if the reloc was
	changed to be against a section symbol, in tc_gen_reloc.
1995-02-13 21:18:22 +00:00
David Edelsohn
53c73f8d0e * arc.h (ARC_OPERAND_LIMM): New flag. 1995-02-13 19:07:55 +00:00
Ian Lance Taylor
405affccae Revert this patch, since it breaks linking PIC code with no dynamic
objects:
	* elfcode.h (elf_bfd_final_link): Add assertion to make sure that
	dynamic and dynobj are in synch.
1995-02-13 19:04:05 +00:00
Stan Shebs
d5c8cefe19 * remote-e7000.c: Comprehensive cleanup; removal of dead code,
simplify code, declare things, format to standards.
	(inferior.h, value.h, command.h, remote-utils.h): Include.
	(e7000_login): Rename to e7000_login_command.
	(e7000_ftp): Rename to e7000_ftp_command.
	(e7000_drain): Rename to e7000_drain_command.
1995-02-13 00:26: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
18d3d85907 * valops.c (value_arg_coerce): Use VALUE_TYPE not SYMBOL_TYPE on
arg, it is a value not a symbol.

	gcc -Wall lint:
	* eval.c: Move declaration of evaluate_subexp_with_coercion from here..
	* expression.h: ..to here.
	* expression.h: Include value.h.
	* ch-lang.c (evaluate_subexp_chill): Add default case in switch.
1995-02-12 21:54:20 +00:00
Jim Kingdon
bc778001af * gdb.base/{callfuncs.exp,callfuncs.c}: Add tests for passing
floats, chars, and shorts where there are ANSI-style function
	definitions.
1995-02-12 21:34:19 +00:00
Per Bothner
2dac71f519 * pr-6292.ch, pr-6292.exp, Makefile.in: New test case. 1995-02-12 19:47:48 +00:00
Per Bothner
7398958c7d * language.h (struct language_defn): New field evaluate_exp.
* c-lang.c (c_language_defn, cplus_language_defn, asm_langauge_defn),
	f-lang.c (f_language_defn), language.c (unknown_language_defn,
	auto_language_defn, local_language_defn), m2-lang.c (m2_language_defn):
	Set evaluate_exp to evaluate_subexp_standard.
	* ch-lang.c (evaluate_subexp_chill):  New function.  Chill-specific
	support for MULTI_SUBSCRIPT.
	(chill_language_defn):  Set evaluate_exp to evaluate_subexp_chill.
	* eval.c (enum noside):  Move from here ....
	* expression.h (enum noside):  ... to here.
	(evaluate_subexp_standard):  New prototype.
	* eval.c (evaluate_subexp):  Renamed to evaluate_subexp_standard.
	Removed lo-longer-needed test for chill_varying_type.
	(evaluate_subexp):  New.  Calls exp->language_defn->evaluate_exp.
1995-02-12 19:21:04 +00:00
Per Bothner
60438e8e3e * ch-exp.y (maybe_expression_list): New non-terminal.
(primitive_value):  Allow empty parameter list.
1995-02-12 19:18:00 +00:00
Per Bothner
7c606261da * symtab.c (add_param_to_type): Remove (commented-out) function,
since that functionality has been re-written.
	* coffread.c:  Remove commented-out add_param_to_type support.
	* mdebugread.c (parse_symbol):  Likewise.
	* stabsread.c (define_symbol):  Likewise.
1995-02-12 18:54:50 +00:00
Per Bothner
5222ca60be * valops.c (value_arg_coerce): Now takes param_type argument.
(call_function_by_hand):  Convert arguments with value_arg_coerce
	early, and overwrite original args with converted args.
	No longer need multiple calls to value_arg_coerce.
	(value_arg_push):  Removed.
	* hppa-tdep.c (hppa_push_arguments):  No longer call value_arg_coerce.
	* mips-tdep.c (mips_push_arguments):  Likewise.
	* alpha-tdep.c (alpha_push_arguments):  Likewise.
	* rs6000-tdep.c (push_arguments, ran_out_of_registers_for_arguments):
	Likewise.
	* value.h (value_arg_coerce):  Remove declaration.  (It's now static.)

	* valops.c (value_cast):  Do COERCE_VARYING_ARRAY after COERCE_REF.
1995-02-12 18:51:42 +00:00
Per Bothner
27202b6a47 * buildsym.c (finish_block): If finishing a function without known
parameter type info, set that from parameter symbols.
	* c-typeprint.c (c_type_print_varspec_suffix):  For TYPE_CODE_FUNC,
	print parameter types, if available.
	* ch-typeprint.c (chill_type_print_base):  Likewise.

	* gdbtypes.h (struct type):  Remove function type field.
	(TYPE_FUNCTION_TYPE):  Remove macro.  We can't as simply re-use
	function types now that we're also storing parameter types.
	And the payoff is much less.
	* gdbtypes.c (make_function_type):  Don't use/set TYPE_FUNCTION_TYPE.
	(recursive_dump_type):  Don't print TYPE_FUNCTION_TYPE.
	* dwarfread.c (read_subroutine_type):  Don't set TYPE_FUNCTION_TYPE.
1995-02-12 18:46:45 +00:00
Jim Kingdon
c44c67b5ae * gdb.base/langs.exp, gdb.base/langs*: New test.
* gdb.base/Makefile.in: Build it.
	* TODO: Remove item about checking that C names don't get C++
	demangling applied; this test tests it.
1995-02-12 17:55:09 +00:00
Jim Kingdon
21af55c92d * buildsym.c (start_subfile): Set language for f2c like for cfront. 1995-02-12 17:53:34 +00:00
Jim Kingdon
d05baf08ac * gdb.texinfo (Setting): Talk about the language of a source file
versus the working language.  The old documentation did not match
	what GDB did.
1995-02-11 04:24:21 +00:00
Ian Lance Taylor
e13a80f72f * config/tc-i386.c (tc_i386_fix_adjustable): Use S_IS_EXTERN
rather than !S_IS_LOCAL.
You might think they would be equivalent, but....
1995-02-10 19:05:43 +00:00
David Edelsohn
ac5357fa5d E_ARC_CPU_XXX renamed to E_ARC_MACH_XXX for consistency with rest of BFD. 1995-02-10 04:34:36 +00:00
David Edelsohn
c81a2ce3bf (arc_get_disassembler): Renamed from arc_disassembler. 1995-02-10 03:55:34 +00:00
David Edelsohn
9c78b44872 * dis-asm.h (print_insn_arc): Deleted.
(arc_get_disassembler): Declare.
1995-02-10 03:48:27 +00:00
David Edelsohn
9f05921fb7 * disassemble.c (disassembler, case bfd_arch_arc): Call
arc_disassembler to get disassembler routine.
1995-02-10 03:42:43 +00:00
David Edelsohn
6acc9345e1 Lotsa arc stuff. 1995-02-10 03:38:14 +00:00
David Edelsohn
ecec4df3e8 * arc-opc.c (MULTSHIFT operand): Delete.
(UNSIGNED, SATURATION): New operands.
	(mac, mul, mul64, mulu64): New insns.
	(ext. asl, asr, lsr, ror): Only available on host and graphics cpus.
	(padc, padd, pmov, pand, psbc, psub, swap): New insns.
	(host,graphics,audio extended and auxiliary regs): Define.
	(ss, sc, mh, ml): New suffixes.
	(arc_opcode_supported, arc_opval_supported): New functions.
	(insert_multshift, extract_multshift): Deleted.
1995-02-10 03:37:57 +00:00
David Edelsohn
98d42df90d * arc-dis.c (print_insn_arc): Rename to print_insn and make static.
New argument `cpu', pass it to arc_opcode_init_tables.
	Document byte order dependencies.  Ignore unsupported insns.
	(arc_disassembler): New function.
	(print_insn_arc_base, print_insn_arc_host, print_insn_arc_graphics,
	print_insn_arc_audio): New functions.
1995-02-10 03:23:16 +00:00
Rob Savoye
1703d66470 * op50n-rom.c: Add the control registers. 1995-02-10 03:21:55 +00:00
David Edelsohn
32a0dad5b4 * arc.h (ARC_MACH_{BASE,HOST,GRAPHICS,AUDIO}): Define.
(ARC_MACH_MASK, ARC_OPCODE_MACH, ARC_OPVAL_MACH): Define.
	(ARC_HAVE_MULT_SHIFT): Delete.
	(ARC_HAVE_MACH): Define.
	(struct arc_opcode): New field `flags'.
	(struct arc_operand_value): Ditto.
	(arc_opcode_supported): New function.
	(arc_opval_supported): Ditto.
1995-02-10 03:02:09 +00:00
David Edelsohn
31add5f0c9 * config/tc-arc.c (md_pseudo_table): Add .cpu.
(comment_chars): Add ';'.
	(arc_mach_type, mach_type_specified, cpu_tables_init_p): New globals.
	(md_parse_option): Delete support for -mmult.  Add -mcpu=xxx.
	(md_begin): Current ARCs are little endian.
	Call bfd_set_arch_mach to set the cpu type.
	(init_opcode_tables): New function.
	(md_begin): Ignore suffixes and registers not supported by cpu.
	(md_assemble): Initialize opcode tables here.
	Ignore opcodes not supported by selected cpu.
	Always ask for more memory in one piece.
	(arc_cpu): New function.
	(md_numbers_to_chars): Support both endians (will probably be needed
	eventually anyway).
	(md_apply_fix): Likewise.
1995-02-10 02:01:01 +00:00
David Edelsohn
2db01c3d52 * config/tc-arc.h (LOCAL_LABEL): Delete "_.L_", gcc works around
dwarfout.c quirk.
1995-02-10 02:00:43 +00:00
David Edelsohn
2ec8f45e6a Lotsa arc stuff. 1995-02-10 02:00:13 +00:00
David Edelsohn
c932fd968a Regenerated. 1995-02-10 01:41:57 +00:00
David Edelsohn
866da18e1f * archures (bfd_mach_arc_base): #define.
(bfd_mach_arc_host, bfd_mach_arc_graphics, bfd_mach_arc_audio): Ditto.
	* cpu-arc.c (arch_info_struct): Define entries for each cpu variant.
	(bfd_arc_arch): Link each one in.
	(arc_get_mach): New function.
	* elf32-arc.c (arc_info_to_howto_rel): Renamed from arc_info_to_howto.
	(elf_info_to_howto_rel): Update.
	(arc_elf_object_p, arc_elf_final_write_processing): New functions.
	(elf_backend_object_p): Define.
	(elf_backend_final_write_processing): Define.
	(USE_REL): Define.
1995-02-10 01:40:36 +00:00
Ken Raeburn
10bf6ddf08 * Makefile.in (BFD32_BACKENDS): Add i386msdos.o. 1995-02-10 00:17:32 +00:00
Stan Shebs
76a457c016 * Makefile.in (CLIBS): Add $(LIBIBERTY) before, in addition to
after, any host/target/native libraries.
	* dcache.c (insque, remque): Remove declarations.
	* gdbtypes.h (type_code): Remove trailing comma.

	From Peter Schauer:
	* xcoffread.c (read_xcoff_symtab) [C_HIDEXT]: Move #ifdef
	STATIC_NODEBUG_VARS inside case.
1995-02-10 00:02:15 +00:00
Stan Shebs
e91160dcbe keep tm-pro.h 1995-02-09 23:38:29 +00:00
Stan Shebs
c8348208bf keep est.mt 1995-02-09 23:37:11 +00:00
Ken Raeburn
4ad2d64031 * Makefile.in (distclean): Do recursive deletion, since ldscripts is a directory. 1995-02-09 23:33:41 +00:00
Ian Lance Taylor
79c4bb347e * config/tc-i386.c (md_assemble): Adjust conditions for changing
BFD_RELOC_32 to BFD_RELOC_386_GOTPC to handle a switch in frags.
	Patch originally from Rob Ryan <robr@cmu.edu>.

	* config/tc-i386.c: Include subsegs.h.
	(tc_i386_fix_adjustable): Declare return value.
	(i386_operand): Don't use an assignment directly as a condition.
1995-02-09 23:19:27 +00:00
Jim Kingdon
08bac7adef * gdb.stabs/weird.exp: Remove "Haven't examined" comment which
went with the const70 xfail.  The xfail went away a year ago.
1995-02-09 22:49:51 +00:00
Stan Shebs
7010c43a6e * i960-dis.c (struct tabent, struct sparse_tabent): Change the
signed char fields to shorts, more portable.
1995-02-09 22:46:54 +00:00
Jim Kingdon
ad325d68af * gdb.base/signals.exp: Rename a bunch of tests to give unique names. 1995-02-09 22:45:51 +00:00
Ian Lance Taylor
be2213ebee * ldmain.c (main): If trace_file_tries is true, and we are using
an internal linker script, print out the script.
	* ldfile.c (try_open): Reindent function.  Make the messages about
	opening script files more informative.
PR 6309.
1995-02-09 21:57:55 +00:00
Ian Lance Taylor
d0130cc888 * objcopy.c (copy_usage): Rename parameter to avoid shadowing.
(strip_usage): Likewise.

	* objcopy.c (struct section_add): Define.
	(add_sections): New static variable.
	(copy_options): Accept --add-section.
	(copy_usage): Mention --add-section.
	(copy_object): Add sections from the add_sections list.
	(copy_main): Handle --add-section.
	* binutils.texi, objcopy.1: Document --add-section.
1995-02-09 21:18:01 +00:00