Commit Graph

134 Commits

Author SHA1 Message Date
Jason Molenda 43e526b9b4 import gdb-1999-07-12 snapshot 1999-07-12 11:15:22 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 392a587b05 import gdb-1999-05-25 snapshot 1999-05-25 18:09:09 +00:00
Stan Shebs c906108c21 Initial creation of sourceware repository 1999-04-16 01:35:26 +00:00
Stan Shebs 071ea11e85 Initial creation of sourceware repository 1999-04-16 01:34:07 +00:00
Andrew Cagney c634a08ff8 HPMERGE:
Pass gdb_stderr instead of stderr.
In serial.c, fix call to gdb_fclose() - pass gdb_file** not gdb_file*
1999-01-18 01:24:06 +00:00
Michael Snyder 677f415c03 * thread.c: cull duplicate prototypes. Move prototypes to top.
* serial.c: indentation cleanup.
        * breakpoint.c: add casts to eliminate compiler warnings.
1999-01-13 23:44:07 +00:00
David Taylor 65b07ddca8 all remaining *.c *.h files from hp merge. 1998-12-31 21:58:30 +00:00
Martin Hunt 1d7a3fd775 Wed Mar 4 16:53:52 1998 Martin M. Hunt <hunt@cygnus.com>
* serial.c (_initialize_serial): Add a description of
	"set remotelogbase".

	* command.c (do_setshow_command): If no arguments are supplied,
	don't dump core, instead print out an error message.
1998-03-05 01:04:13 +00:00
Geoffrey Noer 9cf7f520c6 Thu Aug 7 19:40:52 1997 Geoffrey Noer <noer@cygnus.com>
Changes to OCD support to support wiggler box as well as
        target boxes:
        * ocd.c: change speed in init command to 0 from 80,
        add (temporary) logging commands to help debugging,
        (ocd_open): if "target ocd wiggler lpt" then use special
        ser-ocd.c serial interface which communicates with Wigglers.dll,
        otherwise do as we did before
        (ocd_get_packet): add OCD_LOG_FILE and OCD_SET_CONNECTION to
        switch of known commands of len 0
        * ocd.h: add OCD_LOG_FILE
        * serial.c (serial_open): do serial_interface_lookup on ocd
        in the case of ocd
        * ser-ocd.c: add buffer to contain responses from sending a
        command to the Wigglers.dll.
        (ocd_readchar): return curr char from buffer and increment ptr
        (ocd_write): send buffer to Wigglers.dll, storing response in
        return buffer and initializing curr location ptr to start of
        buffer.
1997-08-08 02:57:35 +00:00
Peter Schauer 64e6335a65 * serial.c (serial_log_command): Fix fputs_unfiltered calls. 1997-04-19 11:53:58 +00:00
Stu Grossman 4ce7ba5188 * Makefile.in (SUBDIRS): Add mswin so that make cleanup cleans up
that directory.
	* defs.h utils.c (error warning):  Make message be const.
	* main.c (fputs_unfiltered):  Only send gdb_stdout and gdb_stderr
	to hook.  Otherwise send it to fputs.
	* monitor.c monitor.h (monitor_get_dev_name):  New function.  Does
	the obvious.
	* remote-e7000.c:  Remove debugify stuff.  Change printf, fprintf
	to _filtered forms to make output appear in GUIs.  Replace all
	uses of SERIAL_READCHAR with readchar, which has better error
	checking.
	* (e7000_parse_device):  Add prototype.
	* (readchar):  Improve doc.  Handle random serial errors.
	* (expect):  Disable notice_quit code.  It's busted.  Remove
	serial error handling (it's now handled in readchar).  Remove
	remote_debug echoing.  That's handled in readchar as well.
	* (e7000_parse_device):  Remove serial_flag arg.  It's not
	necessary.
	* (e7000_open):  Split into two pieces.  Second part is
	e7000_start_remote, and is error protected.  Now, when we connect
	to the target, we setup the initial frame and registers so that
	the user gets an immediate indication of where the target is.
	* (gch):  Remove debug output.  That's handled by readchar.
	* (e7000_read_inferior_memory):  Handle errors better.
	* (_initialize_remote_e7000):  Get rid of `<xxx>' things from
	command names.  They show up when doing completion and confuse
	things horribly.
	* ser-e7kpc.c:  Remove the last seven months of brain damage.  Get
	rid of the DLL's since we can access the device directly from Win32s
	and Win95.  Get rid of debugify crud.
	* serial.c:  Remove debugify cruft.
	* (serial_logchar serial_log_command serial_write serial_readchar
	serial_send_break serial_close):  Merge common functionality into
	serial_logchar.  Clean up rest of routines.
	* sparclet-rom.c:  Disembowel.  Leave only download routine.
	Download routine now switches to remote target automatically.
	* top.c (disconnect):  Only define if SIGHUP is defined.  Cleans
	up MSVC/Win32 problem.
	* utils.c (gdb_flush):  Don't call hook unless it's for gdb_stdout
	or gdb_stderr.
	* config/sh/tm-sh.h:  Define TARGET_SH for WinGDB.
	* config/sparc/tm-sparclet.h:  Remove override for prompt.
1997-04-19 01:42:34 +00:00
Dawn Perchik e36491f4a5 * remote-e7000.c, ser-e7kpc.c, serial.c: Remove // comments. 1997-02-14 02:20:48 +00:00
Dawn Perchik 16a43bf443 * defs.h: Fix cntl-C to read from the Windows message queue.
Add prototypes for make_final_cleanup (and the other cleanup
	routines.
	* remote-e7000.c: Fix sync code to timeout if unable to sync.
	Change sync code to report status while trying to sync-up
	with hardware.  Add debugging output and document.
	* ser-e7kpc.c: Swap order of len & offset to match implementation.
	Add debugging output and document.
	* serial.c: Add debugging output.
	* top.c: Add call to do_final_cleanups.
	Remove conditionals preventing Win32 from getting SIGQUIT.
	* utils.c: (*_cleanup): Modify cleanup routines to accept a cleanup
	chain as a parameter.  Extract this generic code from the cleanup
	routines into separate funtions (*_my_cleanup).  Keep old
	functionality by passing "cleanup_chain" to the new funtions.
	Define the cleanup chain "final_cleanup_chain" to be a cleanup
	chain which will be executed only when gdb exits.  Add functions
	(*_final_cleanup) to match the original (*_cleanup) functions.
	(pollquit, quit, notice_quit): Fix to read cntl-C from the
	Windows message queue.
1997-02-12 10:27:11 +00:00
Stu Grossman d9951af428 * Makefile.in: Add mswin to SUBDIRS. Add rules for
mswin/libwingdb.a and remote-wiggler.o.
	* breakpoint.c (breakpoint_here_p):  Clean up bp enabled test.
	* (breakpoint_inserted_here_p):  New func, just like
	breakpoint_here_p, except it's honest.  Honestly.
	* breakpoint.h:  Proto for above.
start-sanitize-gdbtk
	* configure configure.in:  Add host *windows* to list of hosts
	that don't support GDBtk.
end-sanitize-gdbtk
	* configure configure.in:  Add mswin to configdirs if host is
	i[3456]86-*-windows.
	* core-aout.c (fetch_core_registers register_addr) gdbcore.h:
	Change all vars that can contain addresses to type CORE_ADDR.
	* findvar.c (supply_register):  Allow val to be NULL.  This means
	that regno is unsupported.
	* (read_pc read_pc_pid write_pc write_pc_pid):  Make non-pid forms
	just call pid forms with inferior_pid so that there's only once
	place to hack PC's and such.
	* infrun.c (proceed):  Don't skip breakpoints if user changed PC.
	* remote-wiggler.c:  New file.  Support for BDM interface from
	Macraigor Systems.
	* serial.c:  Enhance serial logging capability.  Add hex and octal
	output modes (set remotelogbase {hex|octal|ascii}.  Also log
	breaks, timeouts, errors, and eofs.
	* serial.h:  Redefine SERIAL_SEND_BREAK to go through a wrapper
	function so that we can log breaks.  Don't export serial_logfile
	or serial_logfp.
	* top.c (execute_command):  Don't test for serial_logfp here.
	Just call serial_log_comand, and let serial.c sort it out.
	* valops.c (value_of_variable):  Don't attempt to establish frames
	for static and global variables.  This makes things work a bit
	better if the stack or frame pointer is trashed.
	* config/m68k/monitor.mt (TDEPFILES):  Add remote-wiggler.o.
	* config/m68k/tm-m68k.h:  Define STACK_ALIGN.  CPU32 can't hack
	misaligned stacks during function calls.
1996-09-05 01:01:05 +00:00
Fred Fish b607efe714 See gdb ChangeLog entry with header:
Thu Jul 25 19:41:31 1996  Fred Fish  <fnf@cygnus.com>

for a rather huge set of changes.  I was going to put them here, but it
made cvs dump core.  :-(
1996-07-26 03:01:51 +00:00
Fred Fish 72ae15f6b0 * configure.in: Check for setpgid function.
* config.in: Regenerate with autoheader.
	* configure: Regenerate with autoconf.
	* inflow.c (_initialize_inflow): Only try to use _SC_JOB_CONTROL
	if it is actually defined.
	(gdb_setpgid): Use HAVE_SETPGID.
	* ch-exp.c: Change include of <string.h> to "gdb_string.h".
	* c-exp.y: Ditto.
	* f-exp.y: Ditto.
	* m2-exp.y: Ditto.
	* c-exp.y: Include <ctype.h>.
	* serial.c: Ditto.
	* config/m68k/nm-news.h: Add typedef for pid_t which is
	apparently missing from <sys/types.h>.  Enclose entire
	file in NM_NEWS_H ifndef and define when included.
	* config/mips/nm-news-mips.h: Ditto.
	* config/m68k/tm-m68k.h (REGISTER_CONVERT_TO_VIRTUAL,
	REGISTER_CONVERT_TO_RAW): Change name of temporary variable.
1996-04-05 04:22:08 +00:00
Fred Fish 0db5a6fe3f * serial.c: Change fputc/fputs/fprintf to _unfiltered forms. 1996-02-01 04:15:53 +00:00
Fred Fish e8f1ad9a8b * NEWS: Make note of new record and replay feature for
remote debug sessions.
	* serial.c (gdbcmd.h): Include.
	(serial_logfile, serial_logfp, serial_reading, serial_writing):
 	Define here, for remote debug session logging.
	(serial_log_command, serial_logchar, serial_write, serial_readchar):
	New functions for remote debug session logging.
	(serial_open): Open remote debug session log file when needed.
	(serial_close): Close remote debug session log file when needed.
	(_initialize_serial): Add set/show commands for name of remote
	debug session log file.
	* serial.h (serial_readchar): Declare
	(SERIAL_READCHAR): Call serial_readchar().
	(SERIAL_WRITE): Call serial_write().
	(serial_close): Declare as extern.
	(serial_logfile, serial_logfp): Declare.
	* top.c (execute_command): Declare serial_logfp.  Log user command
	in remote debug session log if log file is open.
	* remote-array.c (array_wait): #ifdef out echo to gdb_stdout.
	(array_read_inferior_memory): Rewrite to fix memory overwrite bug.
	* remote-array.c (SREC_SIZE): Remove, duplicates define in
	monitor.h.
	* remote-array.c (hexchars, hex2mem):  Remove, unused.
	* gdbserver/low-linux.c (store_inferior_registers): Remove
	unnecessary extern declaration of registers[].
	* gdbserver/Makefile.in (all): Add gdbreplay.
	* gdbserver/gdbreplay.c: New file.
	* gdbserver/README: Give example of recording a remote
	debug session with gdb and then replaying it with gdbreplay.
1996-01-24 21:30:37 +00:00
Steve Chamberlain c84e500001 * dsrec.c (load_srec): Remove unused variable.
monitor.c (monitor_expect): Don't expect a ^C to echo.
	* serial.c (serial_open): Add parallel interface.
	* sh3-rom.c (parallel, parallel_in_use): New.
	(sh3_load): If parallel_in_use, download though the
	parallel port.
	(sh3_open): Open parallel port if specified.
	(sh3_close): New function.
	(_inititalize_sh3): Add sh3_close hook and documentation.
	* monitor.c (monitor_close): Export.
	* monitor.h (monitor_close): Add prototype.
1996-01-13 00:21:55 +00:00
Stu Grossman 5c8ba01776 * monitor.c (monitor_load_srec monitor_make_srec): Move all
S-record download code into srec.c.
	* srec.c srec.h:  New files.  Contain S-record loading routines
	formerly in monitor.c.
	* serial.c serial.h:  New routine just like fprintf, but uses
	serial_t instead of FILE *.
	* sh-tdep.c (frame_find_saved_regs init_extra_frame_info):
	Don't add four to saved pc (makes things match manual).  Also, fix
	bug where we didn't get pc from stack frame correctly.
	* config/sh/tm-sh.h (SAVED_PC_AFTER_CALL):  Don't add four to
	saved pc.  Real hardware does this for you.
	* sh3-rom.c (sh3_load):  New routine.  Sets up for download then
	calls generic S-record loader.
	* config/h8300/h8300.mt, config/h8500/h8500.mt,
	config/m68k/monitor.mt, config/pa/hppapro.mt, config/sh/sh.mt:
	Add srec.o to TDEPFILES.
1995-11-14 23:24:10 +00:00
Steve Chamberlain 0694bce619 Thu Oct 5 13:27:30 1995 steve chamberlain <sac@slash.cygnus.com>
* win32.c: New file; support for debugging on windows NT.
	* configure.in: (i[345]86-*-win32): New target.
	* configure: Regnerated.
	* eval.c (evaluate_subexp_standard): Remove unused name.
	* serial.c (gdb_string.h): Include.
	* source.c (value.h): Include.
	* config/i386/i386win32.mh (XDEPFILES): Add win32.o
	* config/i386/i386win32.mt: New.
	* config/i386/tm-i386win32.h: New.
1995-10-05 20:57:30 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
Peter Schauer bbcc95bdb1 * config/m68k/tm-m68kv4.h (DWARF_REG_TO_REGNUM): Define to
correctly map floating point registers numbers.

	* dwarfread.c (locval, new_symbol):  Handle variables that are
	optimized out.

	* mdebugread.c:  Replace all uses of builtin_type_* with
	mdebug_type_*. Define and initialize mdebug_type_*.

	* serial.h (serial_close):  Add additional argument `really_close'.
	(SERIAL_CLOSE):  Update serial_close call accordingly.
	(SERIAL_UN_FDOPEN):  Use serial_close to handle refcnt properly.
	* serial.c (serial_close):  Handle `really_close'.
	* serial.h (scb_base):  Moved to serial.c, made static.

	* valops.c (value_addr):  Don't coerce arrays.
	(typecmp):  Coerce arrays instead of calling value_addr if necessary.
1995-07-20 05:52:42 +00:00
Stu Grossman 4887063b3c * defs.h maint.c monitor.c remote-mips.c remote.c: Add support
for `watchdog' variable.  This allows the user to put an upper
	limit on the amount of time that GDB will wait for the target to
	return from a step or continue operation.  This will primarily be
	used for the testsuite, where it is difficult to come up with a
	reasonable timeout for things like function calls, which can take
	as long as three minutes under some circumstances.  If the
	watchdog timer expires, GDB will generate an error that looks like
	`Watchdog has expired.', and will detach from the target.

	* remote-mips.c (mips_open):  Setup initial frame from target.
	Print it out so that user is told where the program is stopped
	when they attach.

	* remote-nrom.c:  Loads of cleanups.  Use serial code to open
	network connections.  Use expect() to wait for response to
	download command.

	* ser-tcp.c (tcp_open):  Retry connection if we get ECONNREFUSED.

	* serial.c serial.h (serial_open serial_fdopen serial_close):
	Allow users to open the same device multiple times.  They all get
	to share the same serial_t.  This is about the only way to have
	multiple active targets use the same device (for download and
	debug).

	* sparcl-tdep.c:  Keep #include <unistd.h> away from GO32.

	* target.c:  Add `targetdebug' variable.  If this is non-zero,
	then a special target is put at the top of the target stack which
	will cause all calls through the target vector to have their args
	and results printed out.
1995-06-08 22:42:36 +00:00
Steve Chamberlain 5567978794 * ser-e7kpc.c: New file to support the E7000 with the PC ISA
bus interface.
	* serial.c (serial_open): Notice device "pc".
	* remote-e7000.c: Fix copyright date.
	(expect): Compare \n and \r the same.
	(e7000_open): Allow pc as a serial port
	* sh/sh.mt: Add ser-e7kpc.
	* h8300/h8300hms.mt: Add ser-e7kpc.
	* main.c (proc_wait): Don't wait if using go32.
1994-06-27 17:16:26 +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
Jim Kingdon 976bb0be03 * Makefile.in (init.c): Generate using the source, not munch. This
cleans up all kinds of hassles (which nm to use in munch, etc).  The
	new formatting conventions (mostly already followed) are that
	the name of the _initialize_* routines must start in column zero,
	and must not be inside #if.
	* munch: Removed.
	* Makefile.in: Remove references to munch.
	* serial.c, remote.c, infptrace.c, maint.c, convex-tdep.c,
	alpha-tdep.c, hp300ux-nat.c, hppab-nat.c, osfsolib.c, remote-es.c,
	procfs.c, remote-udi.c, ser-go32.c, ultra3-xdep.c, sh-tdep.c,
	i960-tdep.c, hppa-tdep.c, h8500-tdep.c, dpx2-nat.c, delta68-nat.c,
	z8k-tdep.c: Make sure the above conventions are followed.  Make
	sure they are all declared as returning void.  Clean up
	miscellaneous comments and such.
1993-10-22 05:55:58 +00:00
Stu Grossman a037b21e75 * remote.c: Add arg names to prototypes, in a modest effort at
clarification.  Also add prototypes for some new functions.
	* (remote_wait):  Better error reporting for 'T' responses.
	* ser-go32.c (strncasecmp):  Make str1 & str2 be const.
	* (dos_async_init):  Make usage message reflect requested port #.
	* ser-tcp.c (tcp_open):  Terminate hostname properly to prevent
	random hostname lookup failures.  Add nicer message for unknown
	host error.  (wait_for):  Wake up in case of exceptions.  Also,
	restart select() if we got EINTR.
	* ser-unix.c (wait_for):  Restart select() if we got EINTR.
	* serial.c: (serial_close):  Clean up code.
1993-06-26 00:22:30 +00:00
Rob Savoye f7630ec9c5 * serial.c (serial_close): If scb is NULL, don't try to close
it.
       * configure.in: Add support for rom68k and bug boot monitors.
1993-06-09 01:18:26 +00:00
Jim Kingdon bf3b8abd19 add comment 1993-06-09 00:41:06 +00:00
Stu Grossman 38dc5e123f * Makefile.in: Add new file ser-tcp.c.
* defs.h (memcmp):  Add decl for memcmp to #ifndef MEM_FNS_DECLARED.
	* findvar.c (write_register):  See if we are writing back the same
	value that's already in the register.  If so, don't bother.
	* remote.c (putpkt, getpkt):  Improve handling of communication
	problems.
	* ser-go32.c:  Prototype it to death.  Update serial_ops and add
	dummy routines where appropriate.
	* ser-tcp.c:  New module to implement serial I/O via TCP
	connections.
	* ser-unix.c:  Clean up getting/setting of tty state.  Get rid of
	SERIAL_RESTORE, add SERIAL_{GET|SET}_TTY_STATE interfaces.
	* serial.c:  Add start of support for connect command.
	(serial_open):  Distinguish between tcp and local devices.
	* serial.h (struct serial_ops):  Get rid of restore, add
	get_tty_state and set_tty_state.  Define protoypes and macros for
	this mess.
	* gdbserver/remote-utils.c:  Add tcp support.  (readchar):  Do
	some real buffering.  Handle error conditions gracefully.
	* gdbserver/remote-inflow-sparc.c:  Update to remote-inflow.c
	(Lynx), remove lots of cruft.
1993-05-29 01:33:36 +00:00
Stu Grossman 4febd10272 * remote.c (remote_open): Use SERIAL_OPEN instead of serial_open.
(putpkt, getpkt):  Use new return codes for SERIAL_READCHAR.
	* ser-go32.c:  Return -1 on most failures, 0 on most successes,
	and use new return codes for go32_readchar().
	* ser-unix.c:  Ditto.  Also, move error handling up to caller for
	SERIAL_SETBAUDRATE().
	* serial.c (serial_open):  Internal call, not SERIAL_OPEN to get
	to specific routine.
	(serial_close):  New routine to wrap around device close routine.
	serial.h:  Clean & document return values more clearly.
1993-04-09 22:14:04 +00:00
Stu Grossman 4e772f4426 * Makefile.in (SFILES OBS): Add serial.[co] & ser-hardwire.[co].
These implement a new serial line interface for talking to remote
	targets.
	* configure.in:  Link ser-hardwire.c to ser-unix.c for all hosts,
	EXCEPT go32, which gets ser-go32.c.
	* remote.c:  Use new serial interface.  More remote-xxx's to be
	converted later.
	* ser-bsd.c, ser-termios.c:  Removed.
	* serial.c:  New.  Implements common operations for all serial
	types.
	* ser-unix.c:  New.  Unix specific serial operations for various
	flavors of Unix (Posix, SysV, BSD).
	* serial.h:  Generic serial interface defs.
	* config/i386/go32.mh, config/i386/i386bsd.h,
	config/m68k/apollo68b.mh, config/sparc/sun4os4.mh:  Remove
	ser-bsd.o from XDEPFILES.  All the magic is now handled in
	configure.in.
1993-04-06 05:50:54 +00:00