Commit Graph

120 Commits

Author SHA1 Message Date
Jim Kingdon 4fb192bec1 * remote-mips.c (mips_error): New function.
* remote-mips.c: Use it instead of error() most places.
1993-12-30 22:25:52 +00:00
Jim Kingdon f4f0d17487 * valops.c (call_function_by_hand, push_word), defs.h (push_word),
convex-xdep.c, m88k-nat.c, i386m3-nat.c, mips-tdep.c, mipsm3-nat.c,
	ns32km3-nat.c, remote-bug.c, m88k-tdep.c, remote-hms.c, remote-mips.c,
	config/gould/tm-np1.h, hppa-tdep.c (hppa_fix_call_dummy), remote-vx.c:
	Use REGISTER_SIZE, unsigned LONGEST, and
	{store,extract}_unsigned_integer, instead of sizeof
	(REGISTER_TYPE) and REGISTER_TYPE.
	* All tm.h files: Change REGISTER_TYPE to REGISTER_SIZE.
	* hppa-tdep.c (pa_print_fp_reg): Remove unused variable val.

	* Makefile.in (ALLDEPFILES): Remove i386ly-nat.c and m68kly-nat.c.
	Add lynx-nat.c.
1993-12-26 18:10:22 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.

Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')

Replaced calls to fopen for output to gdb_fopen.

Added sufficient goo to utils.c and defs.h to make the above work.

The net effect is that stdio output functions are only directly used
in utils.c.  Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.

In the near future, GDB_FILE will stop being equivalant to FILE.

The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior.  The testsuite doesn't notice anything
like this, though.

Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code.  All output from commands
should go to a GDB_FILE.

Target-specific code can still use stdio directly to communicate with
targets.
1993-11-01 22:25:23 +00:00
David D. Zuhn f7fa951fd0 add pid argument to mips_wait 1993-10-21 23:02:40 +00:00
Stu Grossman de43d7d005 * breakpoint.c (breakpoint_thread_match break_command_1):
Thread-specific breakpoint support.
* breakpoint.h (struct breakpoint):  Add thread id field.
* fork-child.c (fork_inferior):  Move call to init_thread_list()
back a bit so that init_trace_fun can do thread functions.
* hppa-tdep.c (restore_pc_queue):  Add pid to call to target_wait.
* hppab-nat.c (child_resume):  Handle default pid.
* hppah-nat.c (child_resume):  Handle default pid.
* i386lynx-nat.c (child_wait):  New arg pid.
* inflow.c (kill_command):  Reset thread list.
* infptrace.c (child_resume):  Handle default pid.
* infrun.c:  Thread-specific breakpoint support.
* inftarg.c (child_wait):  Add pid arg.
* osfsolib.c (solib_create_inferior_hook):  Add pid to call to
target_resume.
* procfs.c:  Multi-thread support.
* remote-bug.c (bug_wait):  Add pid arg.
* remote-hms.c (hms_wait):  Add pid arg.
* remote-mips.c (mips_wait):  Add pid arg.
* remote-mon.c (monitor_wait):  Add pid arg.
* remote-nindy.c (nindy_wait):  Add pid arg.
* remote-sim.c (gdbsim_wait):  Add pid arg.
* remote-udi.c (udi_wait):  Add pid arg.
* remote-vx.c (vx_wait):  Add pid arg.
* remote-z8k.c (sim_wait):  Add pid arg.
* remote.c (remote_wait):  Add pid arg.
* solib.c (solib_create_inferior_hook):  Add pid to call to
target_resume.
* target.h (struct target_ops):  Add pid arg to to_wait and
to_notice_signals.
* thread.c (valid_thread_id):  New func to validate thread #s.
* (pid_to_thread_id):  New func to do the obvious.
* thread.h:  Prototypes for above.

* coff-solib.c (coff_solib_add):  Use nameoffset field to locate
filename.
1993-10-16 06:42:02 +00:00
Jim Kingdon 66a48870ac * remote.c, remote-mips.c: Use sr_get_debug not remote_debug. 1993-09-20 21:20:59 +00:00
Jim Kingdon b11d53baf8 * target.c, target.h: Add "set remotedebug" command.
* remote-bug.c, remote.c, remote-mips.c: Remove "set remotedebug" and
	"set m88ksnoop" options and use generic "set remotedebug" instead.
1993-08-24 06:47:03 +00:00
Stu Grossman 25286543da Sun Aug 1 22:58:18 1993 Stu Grossman (grossman at cygnus.com)
* Makefile.in (CLIBS):  Reorder to make Lynx ld happy.
	* (HFILES):  New file thread.h.
	* (OBS):  New file thread.c.
	* configure.in:  Host config for Lynx/386.
	* fork-child.c (fork_inferior):  Call init_thread_list().
	* infrun.c (resume):  Add pid to invocation of target_resume().
	* (wait_for_inferior): Pay attention to pid from target_wait().
	Multi-threading code now uses this to determine what to do.
	* inftarg.c (child_wait):  Conditionalize based on CHILD_WAIT macro.
	Use target_pid_to_str() macro throughout when printing pid.
	* inferior.h (child_resume):  Add pid to prototype.
	* hppab-nat.c hppah-nat.c infptrace.c (child_resume):  Pass in pid as
	argument, instead of using inferior_pid.
	* procfs.c (procfs_resume):  Pass in pid as argument.  Ignored for
	now.  Use target_pid_to_str() macro throughout for printing process id.
	* remote-adapt.c (adapt_resume):  Pass in pid as argument.
	* remote-eb.c (eb_resume):  Pass in pid as argument.
	* remote-es.c (es1800_resume):  Pass in pid as argument.
	* remote-hms.c (hms_resume):  Pass in pid as argument.
	* remote-mips.c (mips_resume):  Pass in pid as argument.
	* remote-mm.c (mm_resume):  Pass in pid as argument.
	* remote-monitor.c (monitor_resume):  Pass in pid as argument.
	* remote-nindy.c (nindy_resume):  Pass in pid as argument.
	* remote-sa.sparc.c (remote_resume):  Pass in pid as argument.
	* remote-sim.c (rem_resume):  Pass in pid as argument.
	* remote-sp64sim.c (simif_resume):  Pass in pid as argument.
	* remote-st.c (st2000_resume):  Pass in pid as argument.
	* remote-udi.c (udi_resume):  Pass in pid as argument.
	* remote-vx.c (vx_resume):  Pass in pid as argument.
	* remote-z8k.c (rem_resume):  Pass in pid as argument.
	* remote.c (remote_resume):  Pass in pid as argument.
	* solib.c (solid_create_inferior_hook):  Pass inferior_pid to
	target_resume().
	* target.c (normal_pid_to_str):  New routine to print out process
	ID normally.
	* target.h (struct target_ops):  Add pid to prototype at
	to_resume().  (target_resume):  Add pid argument.
	* (target_pid_to_str):  Default definition for normal type pids.
	* thread.c, thread.c:  New modules for multi thread/process control.
1993-08-02 06:25:36 +00:00
Ian Lance Taylor 0907dc0932 * remote-mips.c (_initialize_remote_mips): Added "timeout" and
"retransmit-timeout" variables to set mips_receive_wait and
	mips_retransmit_wait, respectively.
1993-07-28 15:28:53 +00:00
Jim Kingdon 34df79fc9d * findvar.c, defs.h
({extract,store}_{signed_integer,unsigned_integer,address}):
	New routines to replace SWAP_TARGET_AND_HOST.
	All over: All uses of SWAP_TARGET_AND_HOST on integers replaced.
1993-07-10 01:35:53 +00:00
David D. Zuhn 77641260c5 fix include file ordering problem (bfd.h vs. symfile.h) 1993-06-29 15:30:57 +00:00
Jim Kingdon 9748446f53 * defs.h, main.c (catch_errors): Add return_mask arg.
stack.c (print_frame_info): Pass RETURN_MASK_ERROR.
	other callers: Pass RETURN_MASK_ALL.
	(return_to_top_level), callers: Add return_reason arg.
	* utils.c (quit):
	Use return_to_top_level (RETURN_QUIT) instead of error ().
	* main.c (main), tm-nindy960.h (ADDITIONAL_OPTION_HANDLER):
	Use SET_TOP_LEVEL not setjmp (to_top_level).
	* remote-nindy.c: Use catch_errors not setjmp (to_top_level).
1993-06-13 18:16:42 +00:00
Ian Lance Taylor 83909c43b6 (mips_fetch_registers): Pass a pointer to SWAP_TARGET_AND_HOST,
not an integer.
1993-06-11 20:51:22 +00:00
Ian Lance Taylor f63f30e2cc * remote-mips.c (mips_send_packet): Don't print garbage character
in debugging info.
	(mips_request): Don't check that remote pid is 0, because
	sometimes it isn't.
1993-06-11 20:35:35 +00:00
Jim Kingdon 6b27ebe851 * symfile.{c,h} (generic_load): New function.
remote{,-nindy,-eb,-mips}.c: Use it.
1993-06-08 19:48:15 +00:00
Jim Kingdon 71607f9d62 * Remote targets (mourn): Call unpush_target. 1993-04-28 15:33:20 +00:00
Ian Lance Taylor 9a9a88c18f Fix typo, change appropriate instances of -2 to SERIAL_TIMEOUT, add
explicit != 0 tests, improve comments.
1993-04-10 20:25:54 +00:00
Stu Grossman 1724c671da * remote-mips.c, remote-monitor.c, remote-st2000.c: Convert to
new serial interface.
1993-04-09 22:55:00 +00:00
Ian Lance Taylor c2a0f1cb8e * remote-mips.c: New file; implements MIPS remote debugging
protocol.
	* config/idt.mt: New file; uses remote-mips.c
	* configure.in (mips-idt-ecoff): New target; uses idt.mt.

	* mips-tdep.c (mips_fpu): New variable; controls use of MIPS
	floating point coprocessor.
	(mips_push_dummy_frame): If not mips_fpu, don't save floating
	point registers.
	(mips_pop_frame): If not mips_fpu, don't restore floating point
	registers.
	(_initialize_mips_tdep): New function; let the user reset mips_fpu
	variable.
	* tm-mips.h (EXTRACT_RETURN_VALUE, STORE_RETURN_VALUE): If not
	mips_fpu, don't use fp0 as floating point return register.
	(FIX_CALL_DUMMY): If not mips_fpu, don't save floating point
	registers.

Also added remote-mips.c to .Sanitize file.
1993-02-22 23:43:03 +00:00
Ian Lance Taylor 33742334a8 Checkpoint. Runs "hello, world", sets breakpoints, isn't too graceful
about program termination.

This file probably should not be part of gdb 4.8, although it wouldn't
do any actual harm.  Not yet added to .Sanitize.
1993-02-12 20:47:59 +00:00