Commit Graph

16073 Commits

Author SHA1 Message Date
Fred Fish 41756e56ee * defs.h (read_command_lines, query_hook): Update prototypes.
(readline_begin_hook, readline_hook, readline_end_hook): Declare.
	* breakpoint.c (commands_command): Build message in temporary buffer
	and pass that, as well as tty control flag, to read_command_lines.
	* top.c (readline_begin_hook, readline_hook, readline_end_hook):
	Define here.
	(command_loop): Check for non-NULL instream before looping.
	(command_line_input): Use readline_hook when appropriate, to get
	user input from a GUI window.
	(read_next_line): Also build prompt if getting user input from a GUI.
	(recurse_read_control_structure): Fix typo in comment.
	(read_command_lines): Use passed in prompt and tty flag to decide how
	to build message.  Use readline_begin_hook when appropriate, to set
	up a GUI interaction window.  Just return head, whether NULL or not,
	after using readline_end_hook to complete GUI interaction.
	(define_command, document_command): Build message in a temporary
	buffer and pass it to read_command_lines, along with tty flag.
	* gdbtk.c (gdbtk_readline_begin, gdbtk_readline, gdbtk_readline_end):
	New functions.
	(tk_command_loop): Set instream to NULL to enable Tk user interaction.
	(gdbtk_init): Set readline_begin_hook, readline_hook,
	and readline_end_hook.
	* gdbtk.tcl (gdbtk_tcl_readline_begin, gdbtk_tcl_readline,
	gdbtk_tcl_readline_end): New functions.
	(tclsh): Pack scroll bar on right side of window, not left.
PR 9385
1996-05-20 02:05:55 +00:00
David Edelsohn 4242ac27a5 * ldlang.c (dprint_statement): Stop printing at end of list. 1996-05-20 00:01:03 +00:00
Steve Chamberlain de7c7482b1 Support for --force-exe-suffix
* ld.h (args_type): Add force_exe_suffix.
	* ld.texinfo: Add documentation.
	* ldmain.c (main):  Add support for option.
	* lexsup.c (OPTION_FORCE_EXE_SUFFIX): New.
	(ld_options, parse_args):  Add support for option.
1996-05-18 20:28:30 +00:00
Peter Schauer f0c56658fa * blockframe.c (frameless_look_for_prologue):
Add FUNCTION_START_OFFSET only if func_start is non-zero.
	* minsyms.c (lookup_minimal_symbol_by_pc):  Return NULL if
	pc is not in a known section.
	* stack.c (print_frame_info):  Remove check for fi->pc in known
	section, now handled by lookup_minimal_symbol_by_pc.
1996-05-18 09:53:12 +00:00
Fred Fish 81ae689aa3 * gdbtk.tcl (create_command_window): Change a misspelled "get"
to the intended "cget".
	(delete_line): Fix so it deletes the current line at the
	insertion cursor.
1996-05-18 00:24:41 +00:00
Stan Shebs 311a76b266 move stub.c up to main dir 1996-05-17 20:44:15 +00:00
Stan Shebs 8f5a8e2f60 keep sh-stub.c 1996-05-17 20:43:13 +00:00
Stan Shebs 6a4547c0d7 * sh-stub.c: New file, was config/sh/stub.c. 1996-05-17 20:41:56 +00:00
Fred Fish 5bac2b50e2 * gdbtk.tcl (gdb_prompt): Set this early on.
(create_command_window): Use gdb_prompt rather than "(gdb) ".
	(gdbtk_tcl_preloop): Proc executed just prior to Tk main loop.
	(tclsh): If an evaluation window already exists, just bring it
	to the front instead of trying to create another.
	* gdbtk.c (tk_command_loop): New function.
	(gdbtk_init): Call tk_command_loop rather than Tk_MainLoop.
1996-05-17 02:36:13 +00:00
Fred Fish 954a4a2ab1 * gdbtk.tcl (evaluate_tcl_command, tclsh): New functions that
implement a tcl evaluation window for gdbtk maintainers to use.
1996-05-16 23:39:15 +00:00
Ian Lance Taylor c403d3581c * cache.c (bfd_open_file): Unlink the file before opening it for
write.  From Marty Leisner <leisner@sdsp.mc.xerox.com>.

	* opncls.c (bfd_fdopenr): Set opened_once.
1996-05-16 20:49:38 +00:00
Tom Tromey 04c82e25c9 Added lose-inet to docs 1996-05-16 20:35:38 +00:00
Ian Lance Taylor bccbc0aa84 * config/tc-sh.h (struct sh_segment_info_type): Define.
(TC_SEGMENT_INFO_TYPE): Define.
	(sh_frob_label): Declare.
	(tc_frob_label): Define.
	(sh_flush_pending_output): Declare.
	(md_flush_pending_output): Define.
	* config/tc-sh.c (md_assemble): If relaxing, emit a R_SH_CODE
 	reloc before the instruction if necessary.
	(sh_frob_label): New function.
	(sh_flush_pending_output): New function.
	(sh_coff_frob_file): Ignore ALIGN, CODE, DATA, and LABEL relocs
	when looking for the reloc for the target of .uses.
	(md_convert_frag): Fix printf format (%0xlx to 0x%lx).
	(sh_force_relocation): Force CODE, DATA, and LABEL relocs to be
	emitted.
	(md_apply_fix): Ignore CODE, DATA, and LABEL relocs.
	(sh_coff_reloc_mangle): Force CODE, DATA, and LABEL relocs to use
	the absolute symbol.
1996-05-16 19:57:12 +00:00
Tom Tromey f4e769dc02 * gdbtk.tcl (files_command): Correctly insert list of files into
listbox widget.
1996-05-16 18:05:26 +00:00
Tom Tromey 76e641bdd5 * gdbtk.tcl (files_command): listbox command no longer accepts
-geometry.
1996-05-16 17:47:16 +00:00
Michael Meissner d61eb8127b Check for sys/ioctl.h 1996-05-16 15:03:24 +00:00
Jeff Law ecebd69348 * top.c (read_next_line): Fix thinkos. From Don Seeley.
Net buglet.
1996-05-16 04:49:12 +00:00
Stan Shebs b8f3d4c6b0 * gdbtk.tcl (create_command_window): If command window's buffer
is disabled, don't execute any of the key bindings.
1996-05-16 00:31:40 +00:00
Jim Wilson b3319029ac * emultempl/pe.em (set_pe_value): Pass 0 not 16 to strtoul call. 1996-05-15 19:53:31 +00:00
Ian Lance Taylor 3ea36b5319 * config/tc-i386.c (md_assemble): Make sure the opcode suffix
matches the register size.
PR 9700.
1996-05-15 16:26:20 +00:00
Jeff Law cca075fbef * gdb.base/break.exp: Ignore compiler warnings when compiling
break.c.
        * gdb.base/callfuncs.exp: Don't run these tests on the h8300.
        * gdb.base/default.exp: Add h8300 xfails.  Handle messages
        from remote-sim.
        * gdb.base/exprs.exp: Add h8300 xfails.
        * gdb.base/funcargs.exp: Likewise.
        * gdb.base/nodebug.exp: Likewise.
        * gdb.base/printcmds.exp: Likewise.
        * gdb.base/ptype.exp: Likewise.
        * gdb.base/setvar.exp: Handle sizeof (int) != 4 for h8300.  Add
        h8300 xfails.
        * gdb.base/return.exp: Handle float/double precision problems
        on the h8300.
        * gdb.base/funcargs.c: Explicitly make last constant argument to
        call_after_alloca_subr an unsigned long type.
        * gdb.base/return.c: Include stdio.h.
Testsuite work for the H8/300 -gstabs.  HMSE.
1996-05-15 15:04:33 +00:00
Jeff Law ecb9b1cadb * config/obj-coff.c (count_entries_in_chain): Ignore Fixups with
fx_done set.
        (do_relocs_for): Likewise.
        (fixup_segment): Don't just quit if linkrelax is set.  Try to
        apply non pc-relative sym1-sym2 fixups, even if linkrelax is
        nonzero.
So function-relative stabs will work on the H8/300.  HMSE.
1996-05-15 14:40:31 +00:00
Jeff Law 6bafbdfbf6 * coffread.c (coff_symtab_read): Handle C_LABEL symbols like
C_STAT symbols.
        * h8300-tdep.c (h8300_pop_frame): Reset $sp and $pc correctly.
        Flush cached frames just before exiting.
        * remote-sim.c (gdbsim_resume): Complain if the program isn't
        being run.
        * config/h8300/tm-h8300.h (BELIEVE_PCC_PROMOTION): Define.
Fix some bugs exposed by the testsuite.  HMSE.
1996-05-15 14:28:34 +00:00
Stu Grossman 9b33e492d6 * procfs.c (procfs_thread_alive procfs_stop): Make static.
* (procfs_pid_to_str):  New routine to print out thread id's in an
	intelligible manner.
	* sol-thread.c (sol_thread_fetch_registers):  Re-order manner in
	which supply_register is called to fix bug with writing writing
	individual regs.
	* config/sparc/tm-sun4sol2.h:  Define default for
	target_pid_to_str in case host lacks libthread_db.
1996-05-15 01:09:57 +00:00
Ian Lance Taylor ff60fc3aec * som.c (som_slurp_reloc_table): Clear external_relocs cache after
freeing it.
PR 9693.
1996-05-14 22:31:11 +00:00
Ian Lance Taylor 2f710e178f * libbfd.c: Remove #ifdef FILE_OFFSET_IS_CHAR_INDEX, and compile
the code unconditionally.
1996-05-14 16:55:42 +00:00
Stu Grossman 47ef0da56a * Makefile.in config.in configure configure.in
config/sparc/nm-sun4sol2.h config/sparc/sun4sol2.mh
	config/sparc/tm-sun4sol2.h:  Use autoconf to config Solaris thread
	and pthread support, since pre-2.5 systems don't come with
	libthread_db.so.1.

	* procfs.c (info_proc):  Use int instead of id_t.  Old versions of
	Irix don't see to define this.
1996-05-14 07:02:56 +00:00
Fred Fish 572977a552 * gdbtk.c (tk_command): Catch case where no argument is given
since this will cause the tcl interpreter to dump core.
1996-05-14 02:11:53 +00:00
Ian Lance Taylor efb33f6b07 * libcoff-in.h (struct pei_section_tdata): Define structure.
(pei_section_data): Define macro.
	* libcoff.h: Rebuild.
	* coffcode.h (coff_set_alignment_hook): If COFF_IMAGE_WITH_PE,
	store s_paddr field in pei_section_data.
	(coff_compute_section_file_positions): Use pei_section_data rather
	than _cooked_size, and don't overwrite an existing value.
	(coff_write_object_contents): If COFF_OBJ_WITH_PE, set s_paddr to
	0.  If COFF_IMAGE_WITH_PE, set s_paddr to pei_section_data.
	* peicode.h (coff_bfd_copy_private_section_data): Define if
	COFF_IMAGE_WITH_PE.
 	(pe_bfd_copy_private_section_data): New static function if
	COFF_IMAGE_WITH_PE.
PR 9667.
1996-05-14 00:25:50 +00:00
Jeff Law 24ecc17a04 * top.c (execute_control_command, case while_control): Allow
a while command to be interrupted.
Fixes net bug.
1996-05-13 23:53:54 +00:00
Stu Grossman a50cedad0e * sol-thread.c: More cleanup, add comments.
* (sol_thread_resume):  Prevent people from trying to step
	inactive threads.
	* (sol_thread_wait sol_thread_fetch_registers
	sol_thread_store_registers):  Remove unnecessary check for
	sol_thread_active.  These routines won't get called unless threads
	are active.
1996-05-13 23:22:32 +00:00
Stan Shebs 05535e79e9 SH3-E support from Allan Tajii <atajii@hmsi.com>:
* sh-tdep.c (sh_reg_names, sh3_reg_names): Add empty names for
	float registers.
	(sh3e_reg_names): New register name array.
	(sh_processor_type_table): Add sh3e processor type.
	* config/sh/tm-sh.h (REGISTER_VIRTUAL_TYPE): Fix test.
	(REGISTER_NAMES, NUM_REGS, NUM_REALREGS, etc): Adjust for
	full set of registers.
	* remote-e7000.c (want_sh3, want_sh3_nopc): New globals.
	(e7000_fetch_registers, e7000_wait): Use them.
	* sh3-rom.c (sh3_regnames): Add float registers.
	(sh3e_cmds, sh3e_ops): New globals.
	(sh3e_open): New function.
	(_initialize_sh3_rom): Rename from _initialize_sh3, set up
	sh3e target vector.

	* gdbwin.c (reg_order) [TARGET_SH]: Update for SH3-E.
	* initfake.c: Call _initialize_sh3_rom instead of _initialize_sh3.
1996-05-13 18:34:09 +00:00
Michael Meissner 048668d355 More progressive fixes 1996-05-13 17:25:06 +00:00
Stu Grossman 934741a174 * sol-thread.c: Cleanup. gcc -Wall fixes. Add prototypes.
Print out messages instead of codes for thread_db errors.  Make
	access macros for thread and lwp manipulation.  Make cleanups to
	fixup inferior_pid in case of errors.
1996-05-10 23:05:01 +00:00
Michael Meissner fb2a7661fb Set __stack = 0 if it is referenced and not defined. 1996-05-10 20:32:07 +00:00
Michael Meissner f122568e72 Allow GOT, section relative relocations all the time with -mrelocatable 1996-05-10 18:32:01 +00:00
Fred Fish 31ed312c11 * aclocal.m4: Remove unused definition of AC_C_CROSS.
* configure.in: Add powerpcle-*-solaris* host and target config
	so April 30th change does not get lost next time configure is
	rebuilt.
1996-05-10 02:06:36 +00:00
Jackie Smith Cashion 9a739379c4 Fri May 10 00:41:17 1996 James G. Smith <jsmith@cygnus.co.uk>
* interp.c (ColdReset): Fix boolean test.

Actually compare a boolean result, rather than the bitmasks!
1996-05-09 23:43:58 +00:00
Stu Grossman fdfa331511 * Makefile.in, breakpoint.c, corelow.c, fork-child.c, inflow.c,
infrun.c, mac-nat.c, procfs.c, remote.c, sol-thread.c, thread.c,
	win32-nat.c, config/nm-lynx.h:  Rename thread.h to gdbthread.h to
	avoid conflict with Solaris /usr/include/thread.h.
1996-05-09 21:24:20 +00:00
Rob Savoye 7574859fba * abug-rom.c: Config file for the older style ABug monitor thatg
runs on the mvme13x boards.
	* config/m68k/monitor.mt: Add abug support for m68k croos
	debugging.
1996-05-09 18:39:15 +00:00
Rob Savoye 01d8a35928 * emulparams/{elf32bmip.sh,elf32lmip.sh,mipsidt.sh,mipsidtl.sh}:
Set a new variable to signify if the final target is an embedded
	system.
	* scripttempl/{mips.sc,elfmips.sc}: Don't add SIZEOF_HEADERS to
	.text for an embedded system.
1996-05-09 15:56:58 +00:00
Fred Fish 2ae2f07883 * infcmd.c (do_registers_info): Always print the raw floating
point value's bytes in big endian order, so the the leftmost bit
	is the most significant.
PR-9540
1996-05-09 04:20:43 +00:00
Fred Fish 3f37b69612 * breakpoint.c (clear_momentary_breakpoints): Remove dead code
that is referenced nowhere else.
	(set_breakpoint): Ditto.
	(do_enable_breakpoint): Created from enable_once_breakpoint
	with a couple of changes.
	(enable_breakpoint): Call do_enable_breakpoint with an appropriate
	bpdisp enum value to set disposition of breakpoint.
	(enable_once_breakpoint): Ditto.
	(enable_delete_breakpoint): Ditto.
	* breakpoint.h (clear_momentary_breakpoints): Remove prototype.
	* symtab.c (find_pc_line): Improve comments.
	* gdbtk.c: Fix a couple of misspellings.
	* xcoffread.c: Ditto.
1996-05-08 23:34:34 +00:00
Ian Lance Taylor db1e2aa7e4 * srec.c (srec_set_arch_mach): Write as a function rather than a
macro definition.
PR 9637.
1996-05-08 20:56:53 +00:00
Ian Lance Taylor 5ecd6d7f3b * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): If an archive has
no map, just check each member in turn to see whether it is
	required.
PR 9520.
1996-05-08 20:11:29 +00:00
Jackie Smith Cashion f7481d45a5 Wed May 8 15:12:58 1996 James G. Smith <jsmith@cygnus.co.uk>
* interp.c (xfer_direct_word, xfer_direct_long,
	swap_direct_word, swap_direct_long, xfer_big_word,
	xfer_big_long, xfer_little_word, xfer_little_long,
	swap_word,swap_long): Added.
	* interp.c (ColdReset): Provide function indirection to
 	host<->simulated_target transfer routines.
	* interp.c (sim_store_register, sim_fetch_register): Updated to
 	make use of indirected transfer routines.
1996-05-08 14:22:12 +00:00
Michael Meissner aefee5c89f Fixes for ppcboot 1996-05-08 13:41:00 +00:00
Rob Savoye 4db6401f27 * config/abug.exp: New file for the older Motorola Bug monitor
that runs on the mvme13x series VME boards.
	* config/monitor.exp: Use the new config array for target settings
	if they exist.
1996-05-08 04:04:25 +00:00
Stan Shebs 37316b52ef * target.c (debug_to_xfer_memory): Insert line breaks when
dumping the memory block.
1996-05-08 01:41:13 +00:00
Jeff Law 00e6a1b14d * scripttempl/h8300.sc: Place ".tiny" sections right
after ".data" sections.
        * scripttempl/h8300h.sc: Place ".tiny" sections into
        the "tiny" memory region, 0xff8000 through 0xffff00.
HMSE.
1996-05-07 21:26:58 +00:00