aboutsummaryrefslogtreecommitdiff
path: root/gdb/ser-unix.c
AgeCommit message (Collapse)AuthorFilesLines
1994-06-02 * configure.in: Add nlm subdir to configdirs for alpha-*-netwareStu Grossman1-2/+4
target. * defs.h (enum language): Add language_asm. * findvar.c (read_register_bytes read_register_gen write_register_bytes read_register read_register_pid write_register write_register_pid supply_register): Move multi- thread handling down into these routines. Create XXX_pid routines that allow register references to specify the pid. * findvar.c infcmd.c (read_pc read_pc_pid write_pc write_pc_pid read_sp write_sp read_fp write_fp): Move these routines from infcmd to findvar to centralize the whole mess. * i386-nlmstub.c: Portability fixes. * infptrace.c (child_resume): Conditionalize to allow other natives to override it. Remove PIDGET gubbish, it's no longer necessary. * infrun.c (wait_for_inferior): Put registers_changed() before target_wait() to speed up remote debugging. * Replace code that reads registers from other threads with much nicer looking new function calls (see changes to findvar.c). * Don't skip prologues if debugging assembly source. * lynx-nat.c (child_resume): Lynx now needs it's own version of child_resume to handle multi-thread debugging properly. * remote.c: Add O response to get console output from target. * (readchar): Add timeout parameter. Handle SERIAL_EOF and SERIAL_ERROR here to simplify callers. * Change static var timeout to remote_timeout. * (fromhex): Remove unnecessary return -1 at end of routine. * (remote_wait): Turn this into a big switch statement. Add support for O response. * (putpkt): Remove unnecessary handling of SERIAL_EOF/ERROR. * (getpkt): Split getpkt into two parts. read_frame deals with all formatting issues, run-length encoding, and framing. getpkt now handles error recovery, and frame detection. * ser-tcp.c (tcp_readchar): Handle EINTR from read(). * ser-unix.c (hardwire_raw): Set CLOCAL so that we ignore modem control. (hardwire_readchar): Handle EINTR from read(). * symfile.c (deduce_language_from_filename): Add support for .s files. * config/nm-lynx.h: Define CHILD_WAIT so that lynx-nat.c can override infptrace's child_wait. * config/rs6000/rs6000lynx.mh: Use xm-rs6000ly.h & nm-rs6000ly.h instead of XXXlynx.h. * config/rs6000/rs6000lynx.mt: Use tm-rs6000ly.h instead of tm-rs6000lynx.h. * nlm/gdbserve.c: Portability fixes.
1994-02-24 * exec.c (print_section_info): Print entry point for exec_bfd only.Peter Schauer1-2/+2
* ser-unix.c (wait_for): Fix typo in HAVE_TERMIO case.
1994-01-29 * ser-unix.c (wait_for, hardwire_readchar) [HAVE_TERMIO, HAVE_TERMIOS]:Jim Kingdon1-47/+74
If the timeout is too big to fit in c_cc[VTIME], then do multiple reads to achieve the desired timeout. * serial.h (serial_t): Add field timeout_remaining.
1994-01-22 * remote-mips.c (mips_initialize): Clear mips_initializing viaJim Kingdon1-2/+32
cleanup chain, not directly. * ser-unix.c (wait_for) [HAVE_TERMIO, HAVE_TERMIOS]: Make a timeout of -1 mean forever, like in the HAVE_SGTTY case. Warn if we are munging the timeout due to the limited range of c_cc[VTIME].
1994-01-18 * ser-unix.c (hardwire_noflush_set_tty_state): Don't muck with ICANON.Jim Kingdon1-17/+3
* inflow.c (terminal_ours_1): When discussing how to deal with the tty state, make note of query() as well as readline.
1993-12-07set the other three terminal state pieces for systems that HAVE_SGTTYK. Richard Pixley1-0/+6
1993-11-01Change the stream argument to _filtered to GDB_FILE *.Thomas Lord1-4/+4
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-10-08 * inflow.c: Remove unused includes of sys/param.h, etc.Jim Kingdon1-120/+3
* inflow.c, ser-unix.c, ser-go32.c, ser-tcp.c, serial.h, terminal.h: Move all the process group stuff back to inflow.c; that's a better place for it and fixes problems with trying to get/set the process group of a tty we're doing remote debugging on. * terminal.h: Skip the redefine crap if HAVE_TERMIOS.
1993-09-08gcc lintK. Richard Pixley1-5/+4
1993-08-13 * ser-unix.c (get_tty_state): if a descriptor is not a tty, thenK. Richard Pixley1-4/+14
simply save encode this fact as the process group and return success rather than an error. (set_tty_state): if process group is -1, do not reset the process group. (hardwire_reachar): comment change.
1993-08-08* ser-unix.c (hardwire_send_break) [HAVE_SGTTY]: Use select not usleep.Jim Kingdon1-4/+14
1993-07-29* ser-unix.c (gdb_setpgid): Pass our pid, not 0, to setpgid.Jim Kingdon1-1/+4
1993-07-28 * serial.h, ser-{unix,go32,tcp}.c: Add flush_input and send_break.Jim Kingdon1-0/+42
* nindy-share/*, remote-nindy.c: Extensive hacking to make it conform to GDB conventions like using memcpy not bcopy, serial.h, etc. This is to make it host on Solaris, AIX, etc. * Makefile.in: Reflect removed nindy-share files.
1993-07-27 * config/sparc/xm-sun4os4.h: Define MEM_FNS_DECLARED and includeJim Kingdon1-6/+2
<memory.h>. Include <malloc.h> rather than declaring malloc functions ourself. * ser-unix.c (set_tty_state): Don't ignore errors setting process group. * inflow.c (terminal_inferior): If attach_flag set, ignore errors from set_tty_state.
1993-07-19* ser-unix.c: Don't try to use job control with termio.Jim Kingdon1-21/+22
1993-07-02 * ser-unix.c (hardwire_noflush_set_tty_state): Use an assignment,Jim Kingdon1-2/+3
not an initializer, to copy the structure.
1993-07-01 * ser-unix.c (hardwire_print_tty_state) [HAVE_TERMIOS]: Don'tJim Kingdon1-4/+11
print c_line. (_initialize_ser_hardwire): Just check whether _POSIX_JOB_CONTROL is defined; don't care what it is defined to.
1993-06-30 * inftarg.c: Remove unused include of terminal.h.Jim Kingdon1-8/+258
* signals.h: Don't undefine signals anymore. * main.c: Use job_control from serial.h. * fork-child.c (fork_inferior): Use gdb_setpgid. * serial.h, ser-unix.c, ser-go32.c: Provide gdb_setpgid. * utils.c (quit): Use current_target->to_terminal_ours to figure out whether we care about lack of job control, rather than __GO32__. * utils.c: Include serial.h not terminal.h (quit): Use job_control not TIOCGPGRP. * terminal.h: Don't undefine TIOCGPGRP. * serial.h, ser-unix.c, ser-go32.c, ser-tcp.c: Add SERIAL_FLUSH_OUTPUT. * utils.c (quit): Use it. * serial.h: Add SERIAL_UN_FDOPEN. * utils.c (quit): Use it. * ser-unix.c: Add process group to ttystate. [HAVE_SGTTY]: Add tchars, ltchars, and lmode to ttystate. * inflow.c: Include serial.h not terminal.h. Use serial.h stuff to replace most of the maze of #ifdef's. * inflow.c, main.c, inferior.h: make gdb_has_a_terminal a function. * serial.h: Document SERIAL_SET_TTY_STATE as being immediate. * ser-unix.c: Use TIOCSETN not TIOCSETP so it is true. * serial.h, ser-unix.c, ser-go32.c, ser-tcp.c: Add SERIAL_PRINT_TTY_STATE, SERIAL_NOFLUSH_SET_TTY_STATE, and SERIAL_SET_PROCESS_GROUP. * inflow.c: Use them. * config/xm-svr4.h, config/rs6000/xm-rs6000.h, config/sparc/sun4os4.h: Define HAVE_TERMIOS. * Various: Remove all use of TIOC*_BROKEN.
1993-06-27* ser-unix.c: Move #include of <sys/time.h> to HAVE_SGTTY section.Jim Kingdon1-1/+4
1993-06-26 * remote.c: Add arg names to prototypes, in a modest effort atStu Grossman1-12/+17
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-05-29 * Makefile.in: Add new file ser-tcp.c.Stu Grossman1-98/+129
* 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-06 * ser-unix.c (wait_for): Use VTIME to do timeouts instead ofStu Grossman1-16/+46
poll() for termio{s}.
1993-05-04 * ser-unix.c (wait_for): New routine to handle read timeouts,Stu Grossman1-97/+63
etc. Uses poll() if HAVE_TERMIO[S] is defined, select() otherwise.
1993-05-02 * defs.h (UINT_MAX, LONG_MAX, INT_MAX, INT_MIN): Replace hexFred Fish1-1/+1
constants with slightly more portable definitions (still depends on 2's complement arithmetic though). * config/i386/nm-linux.h: Define NO_SYS_REG_H for no <sys/reg.h>. * i386v-nat.c (sys/reg.h): Conditionalize include on NO_SYS_REG_H. Linux doesn't have <sys/reg.h>. * ser-unix.c (termio.h): Include <termio.h> like other files that include termio.h, not <sys/termio.h> which may not exist (on linux for example).
1993-04-30 * ser-unix.c [USE_{TERMIO,ALARM}_TIMEOUT]: New code to deal withJim Kingdon1-17/+96
systems lacking select().
1993-04-09 * remote.c (remote_open): Use SERIAL_OPEN instead of serial_open.Stu Grossman1-19/+12
(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-06 * Makefile.in (SFILES OBS): Add serial.[co] & ser-hardwire.[co].Stu Grossman1-0/+324
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.