Commit Graph

74 Commits

Author SHA1 Message Date
Mark Mitchell b450502905 * configure.ac: On MinGW, define USE_WIN32API and link with
-lws2_32.
	* ser-tcp.c (<winsock2.h>): Include, for Windows.
	(ETIMEDOUT): Define, for Windows.
	(ioctl): Likewise.
	(closesocket): Define, for POSIX.
	(net_open): Adjust for differences in socket functions between
	Windows and UNIX.
	(net_close): Likweise.
	(net_read_prim): New function.
	(net_write_prim): Likewise.
	(_initialize_ser_tcp): Initialize winsock.  Fill in read_prim and
	write_prim.
	* ser-unix.h (ser_unix_readcchar): Remove.
	(ser_unix_read_prim): Declare.
	(ser_unix_write_prim): Likewise.
	* ser-unix.c (generic_readchar): Move to ser-base.c.
	(ser_unix_wait_for): Likewise.
	(do_unix_readchar): Likewise.
	(ser_unix_readchar): Likewise.
	(_initialize_ser_hardwire): Initialize read_prim and write_prim.
	(ser_unix_read_prim): New function.
	(ser_unix_write_prim): Likewise.
	* ser-base.h (generic_readchar): Declare.
	(ser_base_readchar): Likewise.
	* ser-base.c (<winsock2.h>): Include, for windows.
	(fd_event): Use the read primitive specified by the serial
	interface.
	(ser_base_wait_for): Moved from ser-unix.c
	(do_ser_base_read_char): Likewise.
	(generic_readchar): Likewise.
	(ser_base_readchar): Likewise.
	(ser_base_write): Use the write primitive specified by the serial
	interface.
	* ser-pipe.c (_initialize_ser_pipe): Use ser_base_readchar, not
	ser_unix_readchar.  Initialize read_prim and write_prim.
	* serial.c (struct serial_ops): Add read_prim and write_prim.
	* configure: Regenerate.
2005-04-21 05:34:33 +00:00
Mark Mitchell dd5da072a1 * ser-base.c (ser_unix_write): Rename to ...
(ser_base_write): ... this.
	(ser_unix_nop_flush_output): Rename to ...
	(ser_base_flush_output): ... this.
	(ser_unix_flush_input): Rename to ...
	(ser_base_flush_input): ... this.
	(ser_unix_nop_send_break): Rename to ...
	(ser_base_send_break): ... this.
	(ser_unix_nop_drain_output): Rename to ...
	(ser_base_drain_output): ... this.
	(ser_unix_nop_raw): Rename to ...
	(ser_base_raw): ... this.
	(ser_unix_nop_get_tty_state): Rename to ...
	(ser_base_set_tty_state): ... this.
	(ser_unix_nop_noflush_set_tty_state): Rename to ...
	(ser_base_noflush_set_tty_state): ... this.
	(ser_unix_nop_print_tty_state): Rename to ...
	(ser_base_print_tty_state): ... this.
	(ser_unix_nop_setbaudrate): Rename to ...
	(ser_base_setbaudrate): ... this.
	(ser_unix_nop_setstopbits): Rename to ...
	(ser_base_setstopbits): ... this.
	(ser_unix_async): Rename to ...
	(ser_base_async): ... this.
	* ser-base.h (ser_unix_write): Rename to ...
	(ser_base_write): ... this.
	(ser_unix_nop_flush_output): Rename to ...
	(ser_base_flush_output): ... this.
	(ser_unix_flush_input): Rename to ...
	(ser_base_flush_input): ... this.
	(ser_unix_nop_send_break): Rename to ...
	(ser_base_send_break): ... this.
	(ser_unix_nop_drain_output): Rename to ...
	(ser_base_drain_output): ... this.
	(ser_unix_nop_raw): Rename to ...
	(ser_base_raw): ... this.
	(ser_unix_nop_get_tty_state): Rename to ...
	(ser_base_set_tty_state): ... this.
	(ser_unix_nop_noflush_set_tty_state): Rename to ...
	(ser_base_noflush_set_tty_state): ... this.
	(ser_unix_nop_print_tty_state): Rename to ...
	(ser_base_print_tty_state): ... this.
	(ser_unix_nop_setbaudrate): Rename to ...
	(ser_base_setbaudrate): ... this.
	(ser_unix_nop_setstopbits): Rename to ...
	(ser_base_setstopbits): ... this.
	(ser_unix_async): Rename to ...
	(ser_base_async): ... this.
	* ser-pipe.c (_initialize_ser_pipe): Update accordingly.
	* ser-tcp.c (_initialize_ser_tcp): Likewise.
	* ser-unix.c (hardwire_flush_input): Likewise.
	(_initializer_ser_hardwire): Likewise.
2005-03-25 20:06:36 +00:00
Mark Mitchell 3eb25fda5d * Makefile.in (SFILES): Add ser-base.c.
(ser_base_h): New variable.
	(ser-base.o): New target.
	(ser-pipe.o): Depend on $(ser_base_h).
	(ser-tcp.o): Likewise.
	(ser-unix.o): Likewise.  Do not depend on $(event_loop_h).
	* configure.ac (SER_HARDWIRE): Include ser-base.o where
	appropriate.
	* ser-base.c: New file.
	(push_event): Move from ser-unix.c.
	(fd_event): Likewise.
	(reschedule): Likewise.
	(ser_unix_write): Likewise.
	(ser_unix_nop_flush_output): Likewise.
	(ser_unix_flush_input): Likewise.
	(ser_unix_nop_send_break): Likewise.
	(ser_unix_nop_drain_output): Likewise.
	(ser_unix_nop_raw): Likewise.
	(ser_unix_nop_get_tty_state): Likewise.
	(ser_unix_nop_set_tty_state): Likewise.
	(ser_unix_nop_noflush_set_tty_state): Likewise.
	(ser_unix_nop_print_tty_state): Likewise.
	(ser_unix_nop_setbaudrate): Likewise.
	(ser_unix_nop_setstopbits): Likewise.
	(ser_unix_async): Likewise.
	* ser-base.h: New file.
	* ser-pipe.c (ser-base.h): Include it.
	* ser-tcp.c (ser-base.h): Likewise.
	* ser-unix.h (ser_unix_nop_flush_output): Remove.
	(ser_unix_flush_input): Likewise.
	(ser_unix_nop_send_break): Likewise.
	(ser_unix_nop_raw): Likewise.
	(ser_unix_nop_get_tty_state): Likewise.
	(ser_unix_nop_set_tty_state): Likewise.
	(ser_unix_nop_print_tty_state): Likewise.
	(ser_unix_nop_noflush_set_tty_state): Likewise.
	(ser_unix_nop_setbaudrate): Likewise.
	(ser_unix_nop_setstopbits): Likewise.
	(ser_unix_nop_drain_output): Likewise.
	(ser_unix_wait_for): Likewise.
	(ser_unix_write): Likewise.
	(ser_unix_async): Likewise.
	* ser-unix.c (event-loop.h): Do not include it.
	(push_event): Move to ser-base.c.
	(fd_event): Likewise.
	(reschedule): Likewise.
	(ser_unix_write): Likewise.
	(ser_unix_nop_flush_output): Likewise.
	(ser_unix_flush_input): Likewise.
	(ser_unix_nop_send_break): Likewise.
	(ser_unix_nop_drain_output): Likewise.
	(ser_unix_nop_raw): Likewise.
	(ser_unix_nop_get_tty_state): Likewise.
	(ser_unix_nop_set_tty_state): Likewise.
	(ser_unix_nop_noflush_set_tty_state): Likewise.
	(ser_unix_nop_print_tty_state): Likewise.
	(ser_unix_nop_setbaudrate): Likewise.
	(ser_unix_nop_setstopbits): Likewise.
	(ser_unix_async): Likewise.
	(ser_unix_wait_for): Make it static.
	* configure: Regenerated.
2005-03-25 19:47:23 +00:00
Andrew Cagney 8a3fe4f86c 2005-02-10 Andrew Cagney <cagney@gnu.org>
Mark up all error and warning messages.
	* ada-lang.c, amd64-tdep.c, arch-utils.c, breakpoint.c: Update.
	* bsd-kvm.c, bsd-uthread.c, coff-solib.h, coffread.c: Update.
	* core-aout.c, core-regset.c, corefile.c, corelow.c: Update.
	* cp-abi.c, cp-support.c, cp-valprint.c, cris-tdep.c: Update.
	* dbxread.c, demangle.c, doublest.c, dsrec.c: Update.
	* dve3900-rom.c, dwarf2expr.c, dwarf2loc.c: Update.
	* dwarf2read.c, dwarfread.c, elfread.c, eval.c: Update.
	* event-top.c, exec.c, expprint.c, f-lang.c: Update.
	* f-typeprint.c, f-valprint.c, fbsd-nat.c, findvar.c: Update.
	* frame.c, frv-linux-tdep.c, gcore.c, gdbtypes.c: Update.
	* gnu-nat.c, gnu-v2-abi.c, gnu-v3-abi.c, go32-nat.c: Update.
	* hpacc-abi.c, hppa-hpux-nat.c, hppa-hpux-tdep.c: Update.
	* hppa-linux-nat.c, hppa-linux-tdep.c, hppa-tdep.c: Update.
	* hpread.c, hpux-thread.c, i386-linux-nat.c: Update.
	* i386-linux-tdep.c, i386-tdep.c, i386bsd-nat.c: Update.
	* i386gnu-nat.c, i387-tdep.c, ia64-linux-nat.c: Update.
	* ia64-tdep.c, inf-child.c, inf-ptrace.c, inf-ttrace.c: Update.
	* infcall.c, infcmd.c, inflow.c, infptrace.c, infrun.c: Update.
	* inftarg.c, interps.c, irix5-nat.c, jv-lang.c: Update.
	* kod-cisco.c, kod.c, language.c, libunwind-frame.c: Update.
	* linespec.c, linux-nat.c, linux-thread-db.c, m2-lang.c: Update.
	* m32r-rom.c, m68hc11-tdep.c, m68k-tdep.c: Update.
	* m68klinux-nat.c, macrocmd.c, macroexp.c, main.c: Update.
	* maint.c, mdebugread.c, mem-break.c, memattr.c: Update.
	* mips-linux-tdep.c, mips-tdep.c, mipsread.c, monitor.c: Update.
	* nlmread.c, nto-procfs.c, objc-lang.c, objfiles.c: Update.
	* observer.c, ocd.c, p-lang.c, p-typeprint.c: Update.
	* p-valprint.c, pa64solib.c, parse.c, ppc-linux-tdep.c: Update.
	* ppcnbsd-tdep.c, printcmd.c, procfs.c, remote-e7000.c: Update.
	* remote-fileio.c, remote-m32r-sdi.c, remote-rdi.c: Update.
	* remote-rdp.c, remote-sim.c, remote-st.c: Update.
	* remote-utils.c, remote-utils.h, remote.c: Update.
	* rom68k-rom.c, rs6000-nat.c, s390-tdep.c, scm-lang.c: Update.
	* ser-e7kpc.c, ser-tcp.c, ser-unix.c, sh-tdep.c: Update.
	* sh3-rom.c, shnbsd-tdep.c, sol-thread.c, solib-aix5.c: Update.
	* solib-frv.c, solib-irix.c, solib-osf.c, solib-pa64.c: Update.
	* solib-som.c, solib-sunos.c, solib-svr4.c, solib.c: Update.
	* somread.c, somsolib.c, source.c, stabsread.c: Update.
	* stack.c, std-regs.c, symfile-mem.c, symfile.c: Update.
	* symmisc.c, symtab.c, target.c, thread.c, top.c: Update.
	* tracepoint.c, trad-frame.c, typeprint.c, utils.c: Update.
	* uw-thread.c, valarith.c, valops.c, valprint.c: Update.
	* value.c, varobj.c, version.in, win32-nat.c, wince.c: Update.
	* xcoffread.c, xcoffsolib.c, cli/cli-cmds.c: Update.
	* cli/cli-decode.c, cli/cli-dump.c, cli/cli-logging.c: Update.
	* cli/cli-script.c, cli/cli-setshow.c, mi/mi-cmd-break.c: Update.
	* mi/mi-cmd-disas.c, mi/mi-cmd-env.c, mi/mi-cmd-file.c: Update.
	* mi/mi-cmd-stack.c, mi/mi-cmd-var.c, mi/mi-getopt.c: Update.
	* mi/mi-symbol-cmds.c, tui/tui-layout.c, tui/tui-stack.c: Update.
	* tui/tui-win.c: Update.
2005-02-11 04:06:14 +00:00
Michael Snyder 2c1ab59266 2005-01-13 Michael Snyder <msnyder@redhat.com>
* ser-tcp.c: Whitespace tweaks.
	* ser-unix.c: Whitespace tweaks.
	* serial.h: Whitespace tweaks.
2005-01-14 01:59:20 +00:00
Andrew Cagney 98bbd631cc 2004-06-25 Andrew Cagney <cagney@gnu.org>
* defs.h (deprecated_ui_loop_hook): Deprecated.
	* wince.c (child_wait): Update.
	* win32-nat.c (child_wait): Update.
	* v850ice.c (v850ice_wait): Update.
	* top.c (deprecated_ui_loop_hook): Update.
	* serial.h: Update.
	* ser-unix.c (do_hardwire_readchar, do_hardwire_readchar)
	(do_unix_readchar): Update.
	* ser-tcp.c (net_open): Update.
	* remote-sim.c (gdb_os_poll_quit): Update.
	* rdi-share/ardi.c (angel_RDI_ExecuteOrStep): Update.
2004-06-25 19:46:08 +00:00
Andrew Cagney 11c949aaae 2004-06-24 Andrew Cagney <cagney@gnu.org>
* defs.h (post_add_symbol_hook, pre_add_symbol_hook)
	(ui_loop_hook, selected_frame_level_changed_hook): Declare.
	* wince.c (ui_loop_hook): Delete extern declaration.
	* win32-nat.c (ui_loop_hook): Delete extern declaration..
	* v850ice.c (ui_loop_hook): Delete extern declaration..
	* ser-unix.c (ui_loop_hook): Delete extern declaration..
	* ser-tcp.c (ui_loop_hook): Delete extern declaration..
	* remote-sim.c (ui_loop_hook): Delete extern declaration..
	* rdi-share/ardi.c (angel_RDI_ExecuteOrStep): Delete extern.
	ui_loop_hook declaration.
2004-06-24 21:51:49 +00:00
Andrew Cagney 1e4728e7bc 2004-01-09 Andrew Cagney <cagney@redhat.com>
* jv-valprint.c, ser-unix.c: Add missing copyright years.
2004-01-09 20:42:10 +00:00
Andrew Cagney 54f1137d66 2004-01-05 Andrew Cagney <cagney@redhat.com>
* ser-unix.c (ser_unix_async): Fix tipo, "NOTHING_SECHEDULED"
	should be a switch case and not a label.
	* mips-tdep.c (mips32_next_pc): Delete unused labels
	"greater_equal_branch" and "less_zero_branch".
	* jv-valprint.c (java_print_value_fields): Delete unused label
	"flush_it".
2004-01-05 23:09:45 +00:00
Ian Lance Taylor 2fdbdd3980 * ser-pipe.c (_initialize_ser_pipe): Correct call to memset--swap
second and third arguments.
	* ser-tcp.c (_initialize_ser_tcp): Likewise.
	* ser-unix.c (_initialize_ser_hardwire): Likewise.
2003-05-13 19:40:11 +00:00
Andrew Cagney 2cd58942b9 * serial.h (SERIAL_ASYNC): Delete.
(DEPRECATED_SERIAL_FD): Delete.
(SERIAL_DEBUG): Delete.
(SERIAL_DEBUG_P): Delete.
(SERIAL_DRAIN_OUTPUT): Delete.
(SERIAL_FLUSH_OUTPUT): Delete.
(SERIAL_FLUSH_INPUT): Delete.
(SERIAL_SEND_BREAK): Delete.
(SERIAL_RAW): Delete.
(SERIAL_GET_TTY_STATE): Delete.
(SERIAL_SET_TTY_STATE): Delete.
(SERIAL_PRINT_TTY_STATE): Delete.
(SERIAL_NOFLUSH_SET_TTY_STATE): Delete.
(SERIAL_SETBAUDRATE): Delete.
(SERIAL_SETSTOPBITS): Delete.
(SERIAL_CAN_ASYNC_P): Delete.
(SERIAL_IS_ASYNC_P): Delete.
(SERIAL_UN_FDOPEN): Delete.
(SERIAL_READCHAR): Delete.
(SERIAL_CLOSE): Delete.
(SERIAL_FDOPEN): Delete.
(SERIAL_OPEN): Delete.
2001-07-15 20:34:14 +00:00
Andrew Cagney 819cc32466 s/typedef serial_t/struct serial */ 2001-07-11 17:52:32 +00:00
Fernando Nasser 08b4f080d5 2001-05-11 Fernando Nasser <fnasser@redhat.com>
* ser-unix.c (rate_to_code): Issue warning if baud rate is invalid.
	(hardwire_setbaudrate): Set errno to EINVAL and return with error
	if the conversion of the baud rate to code fails.
2001-05-11 18:34:13 +00:00
Kevin Buettner b6ba6518e9 Update/correct copyright notices. 2001-03-06 08:22:02 +00:00
Michael Sokolov 64122a8ba7 * ser-unix.c (hardware_print_tty_state) [HAVE_SGTTY]: Call
fprintf_filtered with correct arguments.
2001-02-06 21:39:46 +00:00
J.T. Conklin 824670030b * monitor.c (#include "gdb_wait.h"): Removed.
* ocd.c: Likewise.
* ppc-bdm.c: Likewise.
* remote-adapt.c: Likewise.
* remote-array.c: Likewise.
* remote-bug.c: Likewise.
* remote-e7000.c: Likewise.
* remote-eb.c: Likewise.
* remote-es.c: Likewise.
* remote-mips.c: Likewise.
* remote-mm.c: Likewise.
* remote-nindy.c: Likewise.
* remote-os9k.c: Likewise.
* remote-rdi.c: Likewise.
* remote-rdp.c: Likewise.
* remote-sds.c: Likewise.
* remote-sim.c: Likewise.
* remote-st.c: Likewise.
* remote-udi.c: Likewise.
* remote-vx.c: Likewise.
* remote-vx29k.c: Likewise.
* remote-vx68.c: Likewise.
* remote-vx960.c: Likewise.
* remote-vxmips.c: Likewise.
* remote-vxsparc.c: Likewise.
* remote.c: Likewise.
* ser-pipe.c: Likewise.
* ser-unix.c: Likewise.
* Makefile.in: Updated dependencies.
-------------------------------------------------------------------
2001-02-02 19:14:33 +00:00
Andrew Cagney ab5ba170e9 * ser-unix.c (wait_for): Initialize the FD_SET before every select
call.
(ser_unix_wait_for): Ditto.
2000-12-02 14:56:20 +00:00
J.T. Conklin 8e1a459b89 * gdbarch.sh, hp-psymtab-read.c, hpread.c, m3-nat.c, mcore-tdep.c,
mips-tdep.c, monitor.c, regcache.c, remote-es.c, ser-unix.c,
somread.c, tracepoint.c: Fix spelling errors in comments.
* gdbarch.c: Regenerate.

* gnu-nat.c (S_exception_raise_request): Fix typos and spelling
errors in strings.
* m3-nat.c (intercept_exec_calls, mach_thread_parse_id): Likewise.
* mcore-tdep.c (mcore_analyze_prologue): Likewise.
* mips-tdep.c (mips16_next_pc, _initialize_mips_tdep): Likewise.
* remote-e7000.c (e7000_start_remote): Likewise.
* remote-rdp.c (handle_swi): Likewise.
* remote-vx.c (vx_load_command): Likewise.
* sh-tdep.c (sh_do_pseudo_register): Likewise.
* sol-thread.c (td_err_string): Likewise.
* symtab.c (decode_line_2): Likewise.
-------------------------------------------------------------------
2000-10-30 21:50:58 +00:00
Fernando Nasser faa5effd27 2000-10-25 Fernando Nasser <fnasser@cygnus.com>
* ser-unix.c (do_unix_readchar): Coding style improvement only.
2000-10-25 14:19:38 +00:00
Fernando Nasser f7c9d7b698 2000-09-15 Fernando Nasser <fnasser@cygnus.com>
* ser-unix.c (do_unix_readchar): Prevent infinite read wait to be
	interrupted after 32K seconds.
2000-09-15 20:40:15 +00:00
Kevin Buettner fba45db2fa Protoization. 2000-07-30 01:48:28 +00:00
Andrew Cagney 9e294fb82f Revert previous ser-unix change. Locks up serial device. 2000-07-01 08:02:53 +00:00
Andrew Cagney 2171aa415b From Jonathan L. Fix ser-unix.c timing out when there was no timeout. 2000-03-28 08:24:28 +00:00
Andrew Cagney 03f2053f96 Replace ../include/wait.h with gdb_wait.h. 2000-02-09 08:52:47 +00:00
Jason Molenda d9fcf2fb1c import gdb-2000-02-01 snapshot 2000-02-02 00:21:19 +00:00
Jason Molenda 2acceee218 import gdb-1999-10-04 snapshot 1999-10-05 23:13:56 +00:00
Jason Molenda c2c6d25f0d import gdb-1999-09-21 1999-09-22 03:28:34 +00:00
Jason Molenda 104c1213b4 import gdb-1999-08-30 snapshot 1999-08-31 01:14:27 +00:00
Jason Molenda c5aa993b1f import gdb-1999-07-07 post reformat 1999-07-07 20:19:36 +00:00
Jason Molenda 9846de1bb5 import gdb-1999-07-07 pre reformat 1999-07-07 17:31:57 +00:00
Jason Molenda 43ff13b418 import gdb-1999-07-05 snapshot 1999-07-05 17:58:44 +00:00
Stan Shebs 7a292a7adf import gdb-19990422 snapshot 1999-04-26 18:34:20 +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
Jim Ingham c98fe0c119 This is the merge of the Itcl3.0 gdbtk development branch into the
trunk.  To build it, you will have to do update -dP in the itcl
directory, and update tcl, tk, tix and libgui as well.
1999-01-28 03:50:17 +00:00
Geoffrey Noer d836385e11 Fri Nov 13 00:15:08 1998 Geoffrey Noer <noer@cygnus.com>
Changes to account for name change from cygwin32 to cygwin and
        clean up Win32-related ifdefs.

        * configure.tgt: check for cygwin* instead of cygwin32.
        New cygwin gdb_target variable loses the "32".
        * configure.host: check for cygwin* instead of cygwin32.
        New cygwin gdb_host variable loses the "32".
        * configure.in: test __CYGWIN__ instead of __CYGWIN32__,
        rename gdb_cv_os_cygwin32 variable to drop the "32".  Call
        AM_EXEEXT instead of AC_EXEEXT since that isn't in a released
        autoconf yet.
        * configure: regenerate.

        * main.c: drop "32" from cygwin_ funcs, include sys/cygwin.h
          where
        cygwin path conv protos live, instead of adding a proto here
          for
        them here.
        * {main.c, ser-tcp.c, ser-unix.c, top.c}: check __CYGWIN__
        instead of __CYGWIN32__.
        * source.c: thoughout, check _WIN32 instead of WIN32.

        * config/i386/cygwin32.mh: delete.
        * config/i386/cygwin.mh: new file, was cygwin32.mh.
        * config/i386/cygwin32.mt: delete.
        * config/i386/cygwin.mt: new file, was cygwin32.mt.
        * config/i386/tm-cygwin32.h: delete.
        * config/i386/tm-cygwin.h: new file, was tm-cygwin32.h.
        * config/i386/xm-cygwin32.h: delete.
        * config/i386/xm-cygwin.h: new file, was xm-cygwin32.h.
        * config/i386/xm-windows.h: #include xm-cygwin.h now.
        * config/powerpc/cygwin32.mh: delete.
        * config/powerpc/cygwin.mh: new file, was cygwin32.mh.
        * config/powerpc/cygwin32.mt: delete.
        * config/powerpc/cygwin.mt: new file, was cygwin32.mt.
        * config/powerpc/tm-cygwin32.h: delete.
        * config/powerpc/tm-cygwin.h: new file, was tm-cygwin32.h.
        * config/powerpc/xm-cygwin32.h: delete.
        * config/powerpc/xm-cygwin.h: new file, was xm-cygwin32.h.

        * rdi-share/aclocal.m4: regenerate with aclocal.
        * rdi-share/configure: regenerate with autoconf.
        * rdi-share/{host.h, hostchan.c, hostchan.h, serdrv.c,
        * serpardr.c,
        unixcomm.c}: check __CYGWIN__ instead of __CYGWIN32__.
1998-11-13 08:16:08 +00:00
Jason Molenda 24418cfbac 1998-10-16 Jason Molenda (jsm@bugshack.cygnus.com)
* command.c copying.c copying.awk core-aout.c core-regset.c
          corelow.c dcache.c i386-tdep.c i386v4-nat.c i387-tdep.c
          infcmd.c infptrace.c infrun.c remote.c solib.c symfile.c
          symmisc.c valarith.c: Add prototypes.

        * defs.h: Add prototype for utils.c::do_run_cleanups.

        * gdbtypes.c: Add prototypes.
        (make_pointer_type): Add braces to remove nested if-else ambiguity.
        (make_reference_type): Ditto.

        * printcmd.c (printf_command): Initialize 'f' and 'string' at
        function startup to suppress possibly-used-before-initialized warning.

        * remote-utils.c: Add prototypes.
        (sr_pollchar): Add braces to remove nested if-else ambiguity.

        * ser-tcp.c: Add prototypes.
        (wait_for): Add braces to remove nested if-else ambiguity.
        (tcp_readchar): Ditto.

        * ser-unix.c: Add prototypes.
        (get_tty_state): Don't define errno here.

        (get_tty_state): Don't define errno here.
        (hardwire_readchar): Only define 't' if we are compiling in a Cygwin
        environment.

        * symtab.c: Add prototypes.
        (find_methods): Add braces to remove nested if-else ambiguity.
        (search_symbols): Set 'i' to an initial value to suppress a
        possibly-used-before-initialized warning.

        * valops.c: Add prototypes.
        (value_cast): Set 'eltype2' to an initial value to suppress a
        possibly-used-before-initialized warning.
        (value_of_variable): Add braces to remove nested if-else ambiguity.
        (value_of_this): Ditto.

        * valprint.c: Add prototypes.
        (print_floating): Add braces to remove nested if-else ambiguity.


Looks like a big change, but it is really just a lot of small stuff.

In the cases where GCC was flagging a possible use-before-initialized
warning on variables, it turned out that these were being used properly
but GCC couldn't see that.
1998-10-16 21:45:06 +00:00
Drew Moseley c2867a6c70 Change the definition of ui_loop_hook to be a function pointer
rather than a function.
1998-07-31 17:26:05 +00:00
Keith Seitz 21b3bc779c * ser-unix.c (wait_for): Do not reset timeout_remaining for cygwin32 so
that
        we can use this member to track real timeouts.
        (hardwire_readchar): Modify for cygwin32 so that we only ever use a real
        system timeout of one second. Track the "real" timeout as a series of th
ese
        one second timeouts.
        Call ui_loop_hook to keep the gui alive.

        * top.c: Define new hook for cygwin32, "ui_loop_hook".

        * gdbtk.c (gdbtk_init): Add ui_loop_hook for CygWin32 to work around
        update problems.
1998-05-24 21:05:12 +00:00
Stu Grossman 63c3e305f6 Update copyright. 1998-05-04 21:27:55 +00:00
Stu Grossman e5a940e2c8 * ser-unix.c (baudtab): Add 57600, 115200, 230400, and 460800 baud. 1998-05-02 16:36:05 +00:00
Fred Fish 3ffbdf1532 PR 15068
* utils.c (quit): Call SERIAL_DRAIN_OUTPUT rather than
 	SERIAL_FLUSH_OUTPUT.
	* serial.h (struct serial_ops): Add drain_output, pointer to
 	function that waits for output to drain.
	(SERIAL_DRAIN_OUTPUT): Macro to wait for output to drain.
	* ser-unix.c (hardwire_drain_output): New function and prototype.

	* ser-unix.c (hardwire_ops): Add entry for drain_output function.
	* ser-tcp.c (tcp_ops): Ditto.
	* ser-ocd.c (ocd_ops): Ditto.
	* ser-mac.c (mac_ops): Ditto.
	* ser-go32.c (dos_ops): Ditto.
	* ser-e7kpc.c (e7000pc_ops): Ditto.
1998-03-06 20:38:45 +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
Steve Chamberlain dedcc91de6 Thu Sep 28 14:32:11 1995 steve chamberlain <sac@slash.cygnus.com>
* callback.[ch]: New files.
	* remote-rdp.c: Support for the ARM RDP monitor.
	* Makefile: Update.
	* arm-tdep.c (arm_othernames): New.
	(_initialize_arm_tdep): install 'othernames' command.
	(arm_nullified_insn, shifted_reg_val, arm_get_next_pc): New.
	* configure.in: Check for termios.h, termio.h and sgtty.h.
	(i[345]86-*-win32*): New host.
	* configure: Regenerated.
	* inflow.c: Clean up inclusions.
	* main.c (main): Check for WINGDB, not WIN32.
	* printcmd.c (do_examine): Put QUIT test in loop.
	* remote-hms.c (e7000_load): Delete.
	(hms_ops): Point to generic_load instead.
	* remote-hms.c (hms_ops): Point to generic_load.
	* remote-sim.c (sim_callback_write_stdout): Becomes
	gdbsim_write_stdout.
	(gdbsim_load): Call generic_load.
	* remote-utils.c (gr_load_image): Delete.
	* ser-unix.c (terminal.h): Include instead of havig
	own #if tree.
	(hardwire_flush_input): Reset input buffer too.
	* source.c (openp): If WIN32 then open file in binary mode.
	* terminal.h: Configure IO mechanism using autoconf defines if available and
	not overriden.
	* utils.c (quit, pollquit, notice_quit): WIN32 check becomes WINGDB check.
	* config/arm/arm.mt (TDEPFILES): Add remote-rdp.o
	* config/arm/tm-arm.h (TARGET_BYTE_ORDER): becomes TARGET_BYTE_ORDER_SELECTABLE.
	(ADDR_BITS_REMOVE): New.
	(ORIGINAL_REGISTER_NAMES, ADDITIONAL_REGISTER_NAMES): New.
	(INST_xx): New
	(FRAME_FIND_SAVED_REGS): Pass the right argument.
	(arm_get_next_pc): Declare.
	* mswin/prebuilt/*/bfdtarget.h (SELECT_ARCHITECTURES): Need leading &.
1995-09-29 00:14:01 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
Fred Fish 6b14af2bc6 * dache.c (struct dcache_block): Change data member from unsigned char
to char, since everything passed in and out of dcache is char or casted
	to appropriate type anyway.
	(dcache_alloc):  Move assignment of db out of test and combine separate
	tests into if-else.
	(dcache_peek_byte):  Change ptr from unsigned char* to char*.
	(dcache_peek_byte):  Remove now unnecessary cast in read_memory call.
	(dcache_peek):  Change cast of incoming data arg.
	(dcache_poke):  Change cast of addr of incoming data arg.
	(dcache_info):  Mask data passed to printf_filtered to lsbyte only.
	(dcache_info):  Change printf_filtered arg from "% 2x" to " %2x".
	* target.c (debug_to_thread_alive): Change return type to int and
	return zero, for type compatibility with other *_thread_alive funcs.
	(cleanup_target): Change cast of ignore function to match type of the
	to_thread_alive member.
	* defs.h (error_hook): Add ATTR_NORETURN.
	* defs.h (NORETURN, ATTR_NORETURN):  Switch from volatile to
	__attribute__ method with gcc 2.7, to avoid gcc 2.6.3 bug.
	* remote.c (remote_wait):  Cast first arg to strtol, strchr, and strncmp
	to "const char *" from "unsigned char *".
	(remote_wait):  Cast arg to putpkt and strcpy from "unsigned char *" to
	"char *".
	(remote_wait):  Change printf format for long arg from "%d" to "%ld".
	(getpkt):  Remove unused variable "bp".
	(remote_fetch_word, remote_store_word):  Ifdef out apparently unused
	functions.
	* breakpoint.c (watchpoint_check):  Removed unused variables
	"saved_level" and "saved_frame".
	* valops.c (value_arg_coerce):  Add other enum TYPE_CODE_* and
	default cases to switch for completeness.
	* infrun.c (wait_for_inferior):  Enclose "have_waited" label
	in #ifdef that matches the one in which it is referenced.
	* ser-unix.c (hardwire_noflush_set_tty_state):  Enclose otherwise
	unused variable "state" in #ifdef that matches one in which it is
	referenced.
	* eval.c (evaluate_subexp_standard):  Remove unused variable "var".
	* eval.c (evaluate_subexp_standard):  Remove unused variable "tmp_symbol".
	* valarith.c (value_subscript):  Remove unused variable "lowerbound",
	which is redeclared in a nested scope prior to use.
	* printcmd.c (print_frame_nameless_args):  Use "%ld" to print long
	arg, not "%d".
	* {mem-break.c, remote-pa.c, remote.c, saber.suppress}:
	Remove unused static var "check_break_insn_size".
	* buildsym.c (finish_block):  Add other enum LOC_* and default
	cases to switch for completeness.
	ch-lang.c (type_lower_upper):  Removed unused label "retry".
	Add other enum TYPE_* and default cases to switch for completeness.
	* f-typeprint.c (f_type_print_args):  Ifdef out unused function
	that may be used someday when Fortran support is complete.
	* ch-valprint.c (chill_print_type_scalar):  Add other enum
	TYPE_* and default cases to switch for completeness.
	(chill_val_print):  Remove unused local var "high_bound" that
	is redeclared in a nested scope prior to use.
	(chill_var_print):  Use "%ld" to print long arg, not "%d".
	* regex.c (re_compile_fastmap, re_match_2):  Add remaining enum types
	and default to switches for completeness.
	* minsyms.c (lookup_minimal_symbol_text): Delete unused variable
	"trampoline_symbol".
	(prim_record_minimal_symbol_and_info):  Return NULL rather than trash.
	* elfread.c (elf_symtab_read):  Don't dereference NULL returns from
	record_minimal_symbol_and_info.
	* f-lang.c (saved_function_list_end):  Ifdef out unused variable
	that may be used someday.
	* f-valprint.c (f_val_print):  Remove unused local variable "straddr".
1995-07-18 04:38:06 +00:00
Stu Grossman 85c8b135fe * serial.h ser-go32.c ser-go32-para.c ser-mac.c ser-tcp.c
ser-unix.c:  Add SERIAL_SETSTOPBITS to set the number of stopbits
	(needed for IDP board?!?!?).
1995-03-07 09:03:37 +00:00
Stu Grossman 2e6784a89f * configure.in: Add nlm subdir to configdirs for alpha-*-netware
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-06-02 16:58:48 +00:00
Peter Schauer 5c07a10bb4 * exec.c (print_section_info): Print entry point for exec_bfd only.
* ser-unix.c (wait_for):  Fix typo in HAVE_TERMIO case.
1994-02-24 12:40:39 +00:00
Jim Kingdon 9db58d3ab4 * ser-unix.c (wait_for, hardwire_readchar) [HAVE_TERMIO, HAVE_TERMIOS]:
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-29 16:12:35 +00:00