* gdbserver/remote-gutils.c: Remove lots of unused functions and
variables.
* gdbserver/remote-inflow.c: Remove lots of unused variables and
#includes. Also, use PTRACE_* symbols instead of constants.
(mywait): Surround calls to wait() with enable/disable_async_io()
so that we can be interrupted from GDB while waiting for the
child. Also, handle child exit more gracefully.
* gdbserver/remote-server.c: Remove lots of unused variables.
Move all extern defs into server.h. Redo main loop so that
failure from getpkt() causes communications to be re-established.
Fix 'k' command so that it restarts the child.
* gdbserver/remote-utils.c: Remove lots of unloved vars and
subrs. Move many extern decls into server.h. (remote_open): For
tcp, seperate usage of proto fd from connected fd. Close proto
fd after getting connection. (putpkt/getpkt): Pay attention to
errors when reading/writing. Report these to the caller. New
routines input_interrupt/enable_async_io/disable_async_io to make
it possible to get an I/O interrupt when data arrives from the
comm link.
* serial.h: New file to contain common defs for all remote files.
* gdbserver/remote-inflow{-sparc}.c (create_inferior): Don't use a
shell when running the child, as args have been expanded by the
time we get here. Simplify calling convention.
* gdbserver/remote-server.c (main): Use new calling convention
for create_inferior, remove defunct code for coalescing argv.
Remove extra calls to mywait(), as we no longer have to wade
through a shell.
* 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.