Commit graph

6109 commits

Author SHA1 Message Date
Jim Wilson
1b79e6e2cd Kill r16/rce/acp stuff. 1996-06-08 03:06:36 +00:00
Michael Meissner
5cadf51b51 Add missing file for solaris on powerpc 1996-06-06 21:11:52 +00:00
Jackie Smith Cashion
911026aa8b Wed Jun 5 01:52:57 1996 James G. Smith <jsmith@cygnus.co.uk>
* configure.in (configdirs): Force 4100 builds to use 4300 GDB
  	target.
	* configure: Rebuild.

	* config/mips/vr4300el.mt (SIM_OBS): Include simulator in
 	little-endian builds.
1996-06-05 15:11:10 +00:00
Jeff Law
f4c952e475 * inftarg.c (child_thread_alive): Protect declaration with
#ifndef CHILD_THREAD_ALIVE.
Fixes net buglet.
1996-06-03 17:59:03 +00:00
Jeff Law
093c1a2f74 * source.c (find_source_lines): Check the time on the symtab's bfd if
it exists, else check the time on the exec_bfd.
Fixes net buglet reported by Michael Snyder @ NeXT.
1996-06-03 17:49:28 +00:00
Jeff Law
2a24f7ff01 Keep abug.exp 1996-05-31 17:11:51 +00:00
Jeff Law
551f3fbb29 * gdb.base/callfuncs.exp: Finish last change -- make sure the
prototype information ends up in the compiler info file.
1996-05-30 17:38:32 +00:00
Mark Alexander
f6decc18d9 * dsrec.c (make_srec): Fix calculation of address size
to allow addresses less than 0x100.
1996-05-30 16:58:48 +00:00
Wilfried Moser
3db21ca5cd * ch-exp.c (ch_lex): In case of LOC_TYPEDEF call calculate_array_length. 1996-05-30 11:26:24 +00:00
Geoffrey Noer
3308a10725 Removed EINVAL reference in remote-mips.c, and put a hardcoded 22 in its
place which reflects what the boards return.
1996-05-28 23:20:12 +00:00
Tom Tromey
e44d14910c * configure: Regenerated.
* aclocal.m4 (CY_AC_PATH_TCLH): Don't use AC_TRY_RUN.
        (CY_AC_PATH_TKH): Don't use AC_TRY_RUN.
1996-05-28 20:34:21 +00:00
Fred Fish
878bd838c0 Update with new/changed files. 1996-05-26 22:09:41 +00:00
Fred Fish
01952376b7 Forgot to include in last checking. 1996-05-26 22:09:20 +00:00
Fred Fish
9391c9977e Changes from: David Mosberger-Tang <davidm@azstarnet.com>
* NEWS:  Add Alpha Linux as a new native configuration.

	* mdebugread.c (parse_symbol): When we find a malloc() symbol with
 	return type VOID, assume no debugging info is available for that
 	object file and patch the return value into VOID *.  Otherwise,
	operations requiring an implicit call to malloc() will fail.

	* infrun.c (wait_for_inferior): The criterion to detect entering a
 	sigtramp handler is now: (a) the current pc is inside a sigtramp
 	handler, (b) the previous pc is not in a sigtramp handler, and (c)
 	the current stack pointer is "inner" than the old one.  Condition
	(c) is new to avoid mistaking a return from a signal handler into
 	sigtramp as a new sigtramp invocation.

	* dcache.c (struct dcache_block): Declare addr as CORE_ADDR.  An
 	int may not be big enough to hold an address.
	(dcache_hit): Ditto.
	(dcache_peek_byte): Fix indentation.

	* configure.in (alpha-*-linux*): Add target.
	* configure: Rebuild

	* config/alpha/tm-alpha.h (PROC_DESC_IS_DYN_SIGTRAMP): New macro.
	(SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
	(DYNAMIC_SIGTRAMP_OFFSET): Ditto.
	(SIGCONTEXT_ADDR): Ditto.
	(FRAME_PAST_SIGTRAMP_FRAME): Ditto.

	* config/alpha/alpha-linux.mh: New file.
	* config/alpha/alpha-linux.mt: Ditto.
	* config/alpha/nm-linux.h: Ditto.
	* config/alpha/tm-alphalinux.h: Ditto.
	* config/alpha/xm-alphalinux.h: Ditto.
	* config/alpha/xm-alphaosf.h: Renamed from xm-alpha.h.
	* config/alpha/alpha-osf1.mh (XM_FILE): Change from xm-alpha.h to
 	xm-alphaosf.h.
	* config/alpha/alpha-osf2.mh: Ditto.

	* blockframe.c (find_pc_partial_function): Pass PC to
 	SIGTRAMP_START and SIGTRAMP_END macros for the benefit of systems
 	that detect sigtramp code via designated code sequences (as is the
 	case for Linux/Alpha, for example).

	* config/i386/tm-i386bsd.h: Change SIGTRAMP_START and SIGTRAMP_END
	to ignore new PC argument.
	* config/m68k/tm-hp300bsd.h: Ditto.
	* config/vax/tm-vax.h: Ditto.

	* alpha-tdep.c (alpha_linux_sigtramp_offset): New function.
	(alpha_osf_skip_sigtramp_frame): Ditto.
	(push_sigtramp_desc): Ditto.
	(alpha_find_saved_regs): Use SIGCONTEXT_ADDR macro to extract
 	sigcontext address from frame.
	(alpha_saved_pc_after_call): When in sigtramp, use
 	alpha_frame_saved_pc() instead of read-register().
	(after_prologue): When inside a dynamically generated sigtramp
 	function, there is no prologue, so return address of first
 	instruction.
	(alpha_in_prologue): Fix typo in comment.
	(find_proc_desc): Use macro DYNAMIC_SIGTRAMP_OFFSET to determine
 	whether we're inside a dynamicaly generated sigtramp function.  If
 	so, create and push and appropriate procedure descriptor.
	(alpha_frame_chain): Use macro FRAME_PAST_SIGTRAMP_FRAME to obtain
 	the frame past a sigtramp frame (if the current frame is indeed a
 	sigtramp function).
	(init_extra_frame_info): Don't read next frame register off of
 	stack-pointer when inside a dynamiccaly generated sigtramp.
	(alpha_pop_frame): Also unlink and destroy procedure descriptors
 	created for dynamically generated sigtramp functions.

	* alpha-nat.c: When compiling under Linux, include <asm/reg.h> and
 	<alpha/ptrace.h> instead of <machine/reg.h>
1996-05-26 21:41:40 +00:00
Jeff Law
31778db0db * h8300-tdep.c (IS_PUSH): Refine.
(IS_MOVE_FP, IS_MOV_SP_FP): Accept H8/300H varaints.
        (IS_SUB4_SP, IS_SUBL_SP): New macros.
        (h8300_skip_prologue): Handle H8/300H prologue code sequences.
        (examine_prologue): Handle addresses from 0x010000 to 0xffffff
        when in H8/300H mode.  Get the return pointer's address correctly
        for the H8/300H.  Handle H8/300H prolouge code sequences.
Avoiding major breakage on the H8/300H, and on the eval board.  Jeez, did
anyone even try to debug H8/300H code with gdb in the past?!?
1996-05-23 21:35:09 +00:00
Jeff Law
52f74d48c9 * symfile.c (generic_load): Print the starting address
of the file just loaded.
For informational purposes.
1996-05-23 21:15:15 +00:00
Fred Fish
04d5f3d6ec * gdb.base/callfuncs.exp: Remove the compiler info file prior to
attempting to regenerate it.  Eliminate use of a temporary file
	and just generate the info file directly.  Source it immediately,
	for consistency of use.
	* gdb.base/corefile.exp: Ditto
	* gdb.base/exprs.exp: Ditto.
	* gdb.base/funcargs.exp: Ditto.
	* gdb.base/langs.exp: Ditto.
	* gdb.base/list.exp: Ditto.
	* gdb.base/mips_pro.exp: Ditto.
	* gdb.base/nodebug.exp: Ditto.
	* gdb.base/opaque.exp: Ditto.
	* gdb.base/ptype.exp: Ditto.
	* gdb.base/scope.exp: Ditto.
	* gdb.base/setvar.exp: Ditto.
	* gdb.base/signals.exp: Ditto.
	* gdb.base/whatis.exp: Ditto.
	* gdb.c++/templates.exp: Ditto.
	* gdb.c++/virtfunc.exp: Ditto.
	* gdb.c++/virtfunc.exp: Use contents of gcc_compiled to decide
 	whether or not to add -lstdc++ to the compile command line args.
1996-05-23 20:38:54 +00:00
Stan Shebs
e7600d8eb5 * mpw-make.sed: Edit @THREAD_DB_OBS@ out of makefile. 1996-05-23 19:12:45 +00:00
Mark Alexander
c92f31c6e5 * dsrec.c (load_srec): Add WAITACK parameter, for machines
like EST visionICE that send back an ACK after each S-record.
	* monitor.c (monitor_wait_srec_ack): New function.
	(monitor_load): Pass monitor_wait_srec_ack to load_srec
	if the monitor's MO_SREC_ACK flag is set.
	* monitor.h: Define MO_SREC_ACK flag.
	* remote-est.c (est_cmds): Add MO_SREC_ACK flag.
	* sh3-rom.c (sh3_load): Accomodate change in load_srec prototype.
	* srec.h: Add WAITACK parameter to load_srec prototype.
1996-05-21 06:09:23 +00:00
Rob Savoye
6a4bfd8350 * config/sparc/sparclite.mt: Add the sparc simulator. 1996-05-20 03:25:57 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
Stu Grossman
8fc2b4170d * fork-child.c (fork_inferior), inferior.h: init_trace_fun now
returns a possibly modified pid.
	* inftarg.c (ptrace_him):  Now returns pid;
	* m3-nat.c (m3_trace_him):  Now returns pid;
	* infcmd.c (run_command):  Minor cleanup.
	* infrun.c (wait_for_inferior):  Add another check for one_stepped
	near where we read the pc to avoid erroneously setting
	random_signal for multi-threaded support.
	* procfs.c:  Add support for Solaris LWPs.  Remove def of
	LOSING_POLL.  Many cleanups...  Several workarounds for Solaris
	lossage.  System call entry and exit are now handled by
	dynamically registered handlers.
	* (syscallname):  Don't barf when handed an unknown syscall
	number.
	* (info_proc_syscalls):  Ditto.
	* sol-thread.c:  New file.  Implements Solaris thread support.
	* symfile.c (symbol_file_add):  Add call to target_new_objfile to
	notify target-dependent code about new symbol tables.
	* (clear_symtab_users):  Call target_new_objfile to notify it of
	the removal of all symbol tables.
	* target.c (push_target):  Make sure that to_close is non-zero
	before calling it.
	* target.h (target_new_objfile):  Provide default.
	* config/alpha/nm-osf2.h:  Define LOSING_POLL because this version
	of OSF can't hack using poll with /proc.
	* config/sparc/nm-sun4sol2.h (target_new_objfile):  Define to be
	sol-thread-new-objfile.
	* config/sparc/sun4sol2.mh:  Add sol-thread.o to NATDEFFILES, and
	add libthread_db.so.1 to NAT_CLIBS.
	* config/sparc/tm-sun4sol2.h:  Define PIDGET, TIDGET, and
	target_pid_to_str.
1996-05-06 21:27:37 +00:00
Michael Meissner
8678180e14 Do not do XCOFF hoooks for ELF systems 1996-05-06 11:56:56 +00:00
Stan Shebs
ec6239dcc2 * sim-gdb.exp: Make the SH simulator allocate less space when
it is targeted.
1996-05-03 23:05:32 +00:00
Stan Shebs
9e9cf82258 * gdbtk.tcl (debug_interface): New global, use to aid debugging.
(insert_breakpoint_tag, delete_breakpoint_tag): Fix range.
	(file_popup_menu): Delete, never used.
	(listing_window_popup): Rename from listing_window_button_1,
	remove breakpoint toggling code.
	(toggle_breakpoint): New procedure.
	(create_file_win): Bind popup menu to button 2, toggle breakpoints
 	with button 1 in breakpoint area, add display of tagged areas if
 	debugging on.
1996-05-03 02:28:13 +00:00
Jeff Law
e51481f967 * From Peter Schauer:
* breakpoint.h (enum bpdisp):  Add del_at_next_stop.
        * breakpoint.c (insert_breakpoints, watchpoint_check,
        bpstat_stop_status):  Avoid bad references to memory freed via
        delete_breakpoint on watchpoints going out of scope.
        Do not delete these watchpoints, disable them and change their
        disposition to del_at_next_stop instead.
        (breakpoint_auto_delete):  Delete all breakpoints whose disposition
        is del_at_next_stop.
        (breakpoint_init_inferior):  Use switch to avoid reference to
        already deleted breakpoint.
Fixes dangling pointer problems with watchpoints.
1996-05-02 18:43:28 +00:00
Jeff Law
d124785e82 * gdb.base/mips_pro.exp: Expect failure for hppa*-*-* in backtrace
test.
1996-05-02 18:28:53 +00:00
Fred Fish
062cb0d30d * Makefile.in (rs6000-nat.o): Dependant on xcoffsolib.h.
* config/rs6000/rs6000.mh (NATDEPFILES): Move xcoffread.o ...
	* config/rs6000/rs6000.mt (TDEPFILES): ... to here
	* xcoffsolib.c (xcoff_relocate_symtab_hook): Define and initialize.
	(solib_info): Call xcoff_relocate_symtab via the hook.
	(sharedlibrary_command): Ditto.
	* xcoffread.c: Remove all FAKING_RS6000 comments and defines.
	(xcoff_add_toc_to_loadinfo_hook): Define and initialize here.
	(xcoff_init_loadinfo_hook): Define and initialize here.
	(scan_xcoff_symtab): Call xcoff_add_toc_to_loadinfo via the hook.
	(xcoff_initial_scan): Call xcoff_init_loadinfo via the hook.
	* xcoffsolib.h (xcoff_relocate_symtab_hook): Declare extern func.
	* rs6000-tdep.c (_initialize_rs6000_tdep): Add initializations
	of xcoff_add_toc_to_loadinfo_hook and xcoff_init_loadinfo_hook.
	* rs6000-nat.c (_initialize_core_rs6000): Add initialization
	of xcoff_relocate_symtab_hook.
1996-05-02 01:32:41 +00:00
Michael Meissner
fe8d28cfc1 Add bieginning of Solaris/PowerPC support 1996-04-30 17:23:41 +00:00
Dawn Perchik
aad0977925 * c-valprint.c (c_val_print): Fix printing for arrays defined
with 0 length.
1996-04-29 23:25:27 +00:00
Stan Shebs
fea17b5545 Support for bi-endian remote breakpoints.
* remote.c (big_break_insn, little_break_insn): New globals.
	(break_insn): Remove.
	(remote_insert_breakpoint, remote_remove_breakpoint): Use own
	code if REMOTE_BREAKPOINT defined, otherwise call memory
	breakpoint functions.
	* config/sh/tm-sh.h (REMOTE_BREAKPOINT): Remove.
	(BIG_REMOTE_BREAKPOINT, LITTLE_REMOTE_BREAKPOINT): Define.
1996-04-28 23:43:05 +00:00
Stan Shebs
5a2934b4be * mon960-rom.c (mon960_cmds): Remove forward decl.
(mon960_load): Use current_monitor instead of mon960_cmds.
	(mon960_regnames): Remove backslashes from line ends.
	(_initialize_mon960): Fix documentation string.
1996-04-28 22:14:17 +00:00
Fred Fish
d2c17d4f50 * symfile.h (psymbol_allocation_list): Expand comments which
describe the psymbol allocation list and how each field is
	used.
1996-04-28 19:22:40 +00:00
Peter Schauer
39ce68291e * breakpoint.c (delete_breakpoint): Fix bpt->val, bpt->exp
storage leaks.
	(breakpoint_re_set_one):  Fix b->exp, b->val, b->cond storage leaks.

	* infcmd.c (run_command), solib.c (locate_base):  Check for
	target_has_execution in addition to inferior_pid, a core file
	from a threaded program is yielding a non-zero inferior_pid.

	* sparc-tdep.c (get_saved_register):  Handle window registers
	in a dummy frame correctly.
1996-04-28 10:49:54 +00:00
Fred Fish
6c0643e30f * Makefile.in (CLIBS): Move $(MMALLOC) past all other libs,
so that anything that wants an allocation function not yet pulled
	in, will get it from mmalloc rather than a system library.
	* Makefile.in (INSTALLED_LIBS): Reorder to match order of CLIBS,
	to avoid surprising results when used.
1996-04-28 03:47:49 +00:00
Jeff Law
6cc17fd543 Fix typo in ChangeLog entry. 1996-04-28 03:37:39 +00:00
Jeff Law
e6e4560d78 Remove some #if 0 code which creeped into wait_for_inferior during
my previous change.
1996-04-28 03:35:58 +00:00
Dawn Perchik
00d93b6d5e * stabsread.c: Changes and bug fixes for cfront support.
Fix bug for class data members.
	Fix parsing bug when no base classes exist.
	Fix memory bug - allocate space for cplusplus specific info.
	Add support for static data.
	Add prototypes for static functions.
	Enhance comments to show what each function expects to parse.
	Cleanup code.
	* stabsread.c(resolve_cont),dbxread.c(resolve_cont): Rename
	function to resolve_cfront_continuation.
1996-04-27 09:47:53 +00:00
Jeff Law
7dbb5eed30 * infrun.c (wait_for_inferior): Call registers_changed when
restarting the inferior to get over a nullified instructions.
Fixes PA testsuite regressions.
1996-04-27 05:56:07 +00:00
Dawn Perchik
73e75264a1 Forgot to checkin ChangeLog with last checkin for cfront support. 1996-04-24 19:42:24 +00:00
Dawn Perchik
94f5a25f2e Add new support for parsing cfront stabs. 1996-04-24 19:34:45 +00:00
Jeff Law
894d8e6946 * infrun.c (wait_for_inferior): Move "have_waited" label
outside of #ifdef conditionals.  Don't trash the wait status
        if we get a signal and the current instruction is nullified.
Fixes long standing problem on the PA (spurious SIGTRAPs)..
1996-04-24 06:36:10 +00:00
Fred Fish
a0e1eb4225 * Makefile.in (VERSION): Bump version number to 4.16.1
* NEWS: Update for 4.16 release.
1996-04-23 23:35:51 +00:00
Stan Shebs
178ed33898 * monitor.h: Clean up comment formatting.
(current_monitor): Remove decl.
	(LOADTYPES, LOADPROTOS, INIT_CMD, etc): Remove definitions.
	(push_monitor, SREC_SIZE): Remove.
	* monitor.c: Expand old macro into current_monitor derefs
	everywhere.
	* remote-os9k.c (current_monitor): Remove definition.
1996-04-22 23:46:02 +00:00
Fred Fish
517cb8d739 Consistently use address <fnf@cygnus.com> for entries. 1996-04-22 23:11:03 +00:00
Mark Alexander
f9fedc48d1 * corefile.c (specify_exec_file_hook): Allow arbitrary number of
hooks.
	(call_extra_exec_file_hooks): New function.
	* h8300-tdep.c: Lint; add .h files to provide missing declarations,
	remove unused variables.
	(set_machine_hook): New function.
	(_initialize_h8300m): Initialize it.

PR 8849.
1996-04-22 22:31:10 +00:00
Ian Lance Taylor
102f473b78 * remote-mips.c (encoding): Don't specify size, to avoid bug in
SunOS native compiler.
1996-04-19 19:05:00 +00:00
Stan Shebs
69159fad82 * monitor.c: Use int rather than LONGEST for values, since
the formatting strings are not prepared to accept long longs.
PR 9432
1996-04-19 01:55:57 +00:00
David Edelsohn
e1b4f28735 * arm-tdep.c (initialize_arm_tdep): Make apcs32 a `zinteger'. 1996-04-18 03:18:20 +00:00
Wilfried Moser
d7d354cb6c * tests1.{ch,exp}: Tets case modified and enhanced. 1996-04-17 08:24:36 +00:00
Stu Grossman
8eff3c7fe6 * corelow.c (add_to_thread_list): Make sure reg_sect is non-null
before de-referencing it.  Prevents deref of NULL pointer if core
	file lacks .reg section.
	* defs.h:  Rename floatformat_{to from}_long_double to
	floatformat_{to from}_doublest.  Get rid of FLOATFORMAT_{TO
	FROM}... macros.
	* findvar.c (extract_floating store_floating):  Change all refs to
	FLOATFORMAT_{FROM TO}... to floatformat_{from to}_doublest.
	* utils.c:  Change floatformat_{to from}_long_double to
	floatformat_{to from}_doublest cuz the new routines will use
	whatever size (double or long double) is appropriate.
	* config/i960/tm-i960.h (REGISTER_CONVERT_TO_VIRTUAL
	REGISTER_CONVERT_TO_RAW):  Change FLOATFORMAT... macros to
	floatformat... routine calls.
1996-04-17 00:48:09 +00:00
Per Bothner
15b03b5783 * stabsread.c (read_type): Move handling of '@' from type
number handling to handling of types proper (as emitted by gcc!).
	For typedefs, allocate the typedef type before reading its
	definition, to properly handling recursive types.
This fixes PR 9434.
1996-04-15 23:45:51 +00:00
Jeff Law
c5ee9d00bf * ch-exp.c (calculate_array_length): Fix prototype.
So gdb will build with non-ansi compilers.
1996-04-15 17:17:19 +00:00
Stu Grossman
449abd8900 * remote-nindy.c (nindy_open): Acquire more target state so that
user can attach to a previously running program.
	* (nindy_fetch_registers nindy_store_registers):  Get rid of fp
	conversion code.  That's all handled in {extract store}_floating
	now.
	* utils.c (floatformat_to_double):  Don't bias exponent when
	handling zero's, denorms or NaNs.
	* config/i960/tm-i960.h (REGISTER_CONVERT_TO_VIRTUAL
	REGISTER_CONVERT_TO_RAW):  Change to using DOUBLST and
	FLOATFORMAT_TO/FROM_DOUBLEST macros.
	* config/i960/tm-nindy960.h:  Undefine
	REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW, and
	REGISTER_CONVERTIBLE.  These are no longer necessary now that all
	the magic happens in extract/store_floating.
1996-04-13 21:33:59 +00:00
Peter Schauer
9898b3b7c7 * eval.c (evaluate_subexp_standard): Report error when attempting to
evaluate subscripts for types which cannot be subscripted.

	* valarith.c (value_x_binop, value_x_unop):  Add noside parameter.
	Return a zero value with the return type of the member function
	if noside is EVAL_AVOID_SIDE_EFFECTS instead of calling the member
	function.
	* values.h (value_x_binop, value_x_unop):  Update prototypes
	accordingly.
	* eval.c (evaluate_subexp_standard):  Update all callers of
	value_x_binop, value_x_unop accordingly.

	* valarith.c (value_neg, value_complement):  Perform ANSI C/C++
	integral promotion on operands.
1996-04-13 10:01:49 +00:00
Fred Fish
38d715a4c8 * README: Update for 4.16 release.
* configure.in (AC_CHECK_FUNCS): Also check for sbrk.
	* configure: Regenerate with autoconf.
	* config.in: Regenerate with autoheader.
	* main.c (main): Only use sbrk() when HAVE_SBRK is defined.
	* top.c (command_loop): Ditto.
1996-04-13 04:38:55 +00:00
Stu Grossman
c6fbd98bed * defs.h: Define TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT
defaults for bi-endian targets.  Replace function pointers for
	floatformat routines with macros.  No need for these to be runtime
	selectable.
	* findvar.c:  Get rid of floatformat function pointers.  Use
	macros in extract_floating and store_floating.
	* remote-nindy.c (nindy_fetch_registers nindy_store_registers):
	Use floatformat macros.
1996-04-12 16:53:08 +00:00
Fred Fish
ee9897be1c * config/nm-m3.h (ATTACH_NO_WAIT): Define. 1996-04-12 06:15:16 +00:00
Fred Fish
d8efbc6679 From: Miles Bader <miles@gnu.ai.mit.edu>
* configure.in (AC_CHECK_HEADERS): check for endian.h.
	Use AC_CHECK_TOOL to find AR & RANLIB.  Add AC_PROG_AWK.
	Add host & target cases for i[345]86-*-gnu*.
	* config.in: Regenerate with autoheader.
	* configure: Regenerate with autoconf.
	* Makefile.in (AR, AWK): Set from corresponding autoconf substs.
	(init.c): Don't scan mig-generated files.
	* defs.h (endian.h): Include if HAVE_ENDIAN_H defined.
	* config/nm-m3.h (ATTACH_NO_WAIT): Define.
	* infcmd.c (attach_command): Use "#ifndef ATTACH_NO_WAIT"
 	rather than "#ifndef MACH".
1996-04-12 06:14:46 +00:00
Stan Shebs
4eaf7c0a94 * remote.c (remotewritesize): New GDB variable, controls size
of memory packets sent to the target.
1996-04-12 01:58:39 +00:00
Stu Grossman
a243a22f43 * dcache.c: Add prototypes. Make many functions static.
* (dcache_peek dcache_fetch dcache_poke):  Make dcache_fetch and
	dcache_poke call dcache_xfer_memory directly in order to fix
	problems with turning off dcache.  dcache_peek is now unnecessary,
	so it goes away.

	* defs.h:  Define new macros HOST_{FLOAT DOUBLE	LONG_DOUBLE}_FORMAT
	and TARGET_{FLOAT DOUBLE LONG_DOUBLE}_FORMAT to specify a pointer
	to a struct floatformat.  This allows for better handling of
	targets whose floating point formats differ from the host by more
	than just byte order.
	* (floatformat_to_long_double floatformat_from_long_double):
	Prototypes for new functions in utils.c.
	* (floatformat_to_doublest floatformat_from_doublest):  Prototypes
	for pointers to floating point conversion functions.  The actual
	function uses either double or long double if the host supports it.
	* findvar.c (floatformat_to_doublest floatformat_from_doublest):
	Initialize to point at correct function depending on HAVE_LONG_DOUBLE.
	* (extract_floating store_floating):  Rewrite.  Now, if host fp
	format is the same as the target, we just do a copy.  Otherwise,
	we call floatformat_{to from}_doublest.
	* remote-nindy.c (nindy_xfer_inferior_memory):  Change param
	`write' to `should_write'.
	* utils.c (floatformat_to_long_double
	floatformat_from_long_double):  New routines that implement long
	double versions of functions in libiberty/floatformat.c.
	* config/i960/tm-i960.h (TARGET_LONG_DOUBLE_FORMAT):  Define this for
	i960 extended real (80 bit) numbers.
	* nindy-share/nindy.c (ninMemGet ninMemPut):  Return number of bytes
	actually read or written.
1996-04-11 21:17:45 +00:00
Wilfried Moser
f046f4c87a * ch-valprint.c (chill_val_print): Remove call to calculate_array_length.
(calculate_array_length): Move function from here ...

        * ch-exp.c (calculate_array_length): ... to here.
        (parse_primval): If we have a symbol with an array type
        and the length is 0, call calculate_array_length.
1996-04-10 10:01:30 +00:00
Wilfried Moser
a539f6d8b9 * eval.c (evaluate_subexp_standard): In case of TYPE_CODE_SET:
Add some checks for powerset compatibility.

        * valops.c (value_slice): Use lowbound instead of lowerbound for
        call to slice_range_type to get correct bounds.
1996-04-09 08:28:50 +00:00
Wilfried Moser
cc1583dac2 * gch981.{ch,exp}, gch1041.{ch,exp}: New test cases. 1996-04-09 08:19:58 +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
Jeff Law
75eb523103 * infptrace.c (kill_inferior): Remove call to "kill"; update
comments.
The "kill" call was declared bogus years ago and is causing problems
on hpux10 (PR 9410).
1996-04-08 21:34:12 +00:00
Geoffrey Noer
7782ee45c4 Modified remote-e7000.c so that :23 isn't appended to the target port
if __WIN32__ is defined.  This is necessary to make e7000 support work
for WinGDB.
1996-04-08 21:08:38 +00:00
Fred Fish
ce0787ef68 From: Miles Bader <miles@gnu.ai.mit.edu>
* gnu-nat.c, gnu-nat.h, msg.defs, exc_request.defs, i386gnu-nat.c,
	msg_reply.defs, notify.defs, process_reply.defs, reply_mig_hack.awk,
	config/nm-gnu.h, config/i386/{i386gnu.mh, i386gnu.mt, nm-gnu.h,
	m-i386gnu.h, xm-i386gnu.h}: New files for GNU hurd.
1996-04-08 05:50:30 +00:00
Fred Fish
125c17af91 * configure.in (case host): Add i386sco5 host.
* configure: Regenerate.

	From: Robert Lipe <robertl@dgii.com>
	Add support for SCO OpenServer 5 (a.k.a. 3.2v5*)  This
	target is an SVR3.2 with COFF, ELF, and shared libes, but
	no /proc.
	* config/i386/i386sco5.mh:  New file.
	* config/i386/nm-i386sco5.h:  New file.
1996-04-07 21:04:21 +00:00
Fred Fish
a6b65627d4 * bcache.c (bcache): When size of chunk to cache is exactly equal to
BCACHE_MAXLENGTH, stash chunk as unique copy.
1996-04-06 17:40:03 +00:00
Fred Fish
eae8aa302e * symfile.c (INLINE_ADD_PSYMBOL): Remove ifdef.
(add_psymbol_to_list): Add an arg for passing CORE_ADDR values and
	use it, rather than calling add_psymbol_addr_to_list.
	(add_psymbol_addr_to_list): Delete.
	(add_psymbol_to_list): Make psymbol static to avoid random data in
	gaps due to alignment of structure members.
	* symfile.h (INLINE_ADD_PSYMBOL, ADD_PSYMBOL_TO_LIST,
 	ADD_PSYMBOL_ADDR_TO_LIST): Remove.  Real world tests show no
	performance improvements by inlining via complicated macros and
	they just make gdb larger and harder to maintain.
	* dwarfread.c (add_enum_psymbol): Replace ADD_PSYMBOL_TO_LIST
	and/or ADD_PSYMBOL_ADDR_TO_LIST macro(s) with call to
	add_psymbol_to_list with appropriate long or CORE_ADDR args.
	(add_partial_symbol): Ditto.
	* partial-stab.h: Ditto.
	* os9kread.c (read_os9k_psymtab): Ditto
	* mdebugread.c (parse_partial_symbols): Ditto.
	(handle_psymbol_enumerators): Ditto.
	(demangle.h): Include.
	* hpread.c (hpread_build_psymtabs): Ditto.
	(hpread_build_psymtabs): Ditto.
	(demangle.h): Include
1996-04-06 10:19:19 +00:00
Stan Shebs
fda6fadc0d * gdbtk.c (running_now): New global variable.
(gdb_cmd): Test it before executing any command.
	(gdbtk_call_command): Set it when inferior is running.
	* gdbtk.tcl (gdbtk_tcl_busy, gdbtk_tcl_idle): Enable and
	disable interaction with command window's text appropriately.
1996-04-05 21:52:38 +00:00
Michael Meissner
51bea8cf37 Add sanitize-gdbtk markers 1996-04-05 18:27:45 +00:00