Commit Graph

20 Commits

Author SHA1 Message Date
Joel Brobecker 4c38e0a4fc Update copyright year in most headers.
Automatic update by copyright.sh.
2010-01-01 07:32:07 +00:00
Kai Tietz a32d7317c7 2009-01-14 Kai Tietz <kai.tietz@onevision.com>
* mingw-ser.c (console_select_thread): Add return to make
	compiler happy.
	(pipe_select_thread): Likewise.
	(file_select_thread): Likewise.
2009-01-14 20:21:09 +00:00
Joel Brobecker 1be7fe8dba * ser-mingw.c (ser_windows_open): Use proper type when casting
in call to _open_osfhandle.
2009-01-09 10:32:34 +00:00
Joel Brobecker 0fb0cc7590 Updated copyright notices for most files. 2009-01-03 05:58:08 +00:00
Pedro Alves efdb2a86e4 * ser-mingw.c: Include "command.h".
(pipe_windows_open): Declare locals at the beginning of the scope.
2008-10-09 01:14:26 +00:00
Paul Pluzhnikov d1a4106143 2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
* utils.c, defs.h (gdb_buildargv): New fn. Wrap buildargv
	and check for out-of-memory condition.
	* exec.c (exec_file_command): Call it.
	* infrun.c (handle_command, xdb_handle_command): Likewise.
	* interps.c (interpreter_exec_cmd): Likewise.
	* linux-nat.c (linux_nat_info_proc_cmd): Likewise.
	* procfs.c (info_proc_cmd): Likewise.
	* remote-mips.c (common_open): Likewise.
	* remote-sim.c (gdbsim_kill, gdbsim_create_inferior)
	(gdbsim_open): Likewise.
	* remote.c (extended_remote_run, remote_put_command)
	(remote_get_command, remote_delete_command): Likewise.
	* ser-mingw.c (pipe_windows_open): Likesise.
	* source.c (add_path, show_substitute_path_command)
	(unset_substitute_path_command, set_substitute_path_command):
	Likewise.
	* stack.c (backtrace_command): Likewise.
	* symfile.c (symbol_file_command, generic_load)
	(add_symbol_file_command): Likesise.
	* symmisc.c (maintenance_print_symbols, maintenance_print_psymbols)
	(maintenance_print_msymbols): Likewise.
2008-10-03 16:36:10 +00:00
Michael Snyder 8775bb90eb 2008-09-03 Angela Marie Thomas <angela@releasedominatrix.com>
* ser-tcp.c (ser_tcp_send_break): New function.
	(_initialize_ser_tcp): Use ser_tcp_send_break.
	* ser-tcp.h (ser_tcp_send_break): New prototype.

2008-09-03  Angela Marie Thomas <angela@releasedominatrix.com>

	* gdb.texinfo (Interrupts): Mention TCP interface for
	sending BREAK.
2008-09-03 23:54:19 +00:00
Carlos O'Donell df3ac60635 gdb/
2008-03-28  Carlos O'Donell  <carlos@codesourcery.com>

	* ser-mingw.c (ser_windows_open): Open requested name.
2008-03-28 17:30:45 +00:00
Daniel Jacobowitz 9b254dd1ce Updated copyright notices for most files. 2008-01-01 22:53:26 +00:00
Daniel Jacobowitz 4577549b8f 2007-10-02 Mark Mitchell <mark@codesourcery.com>
* mingw-hdep.c (gdb_select): Stop helper threads before returning.
	* ser-mingw.c (enum select_thread_state): New type.
	(struct ser_console_state): Add have_started and thread_state.
	(select_thread_wait): New function.
	(thread_fn_type): New type.
	(create_select_thread): New function.
	(destroy_select_thread): Likewise.
	(start_select_thread): Likewise.
	(stop_select_thread): Likewise.
	(console_select_thread): Use new functions.
	(pipe_select_thread): Likewise.
	(file_select_thread): Likewise.
	(ser_console_wait_handle): Likewise.
	(ser_console_done_wait_handle): Likewise.
	(ser_console_close): Likewise.
	(free_pipe_state): Likewise.
	(pipe_wait_handle): Likewise.
	(pipe_done_wait_handle): Likewise.
	(struct net_windows_state): Derive from ser_console_state.
	(net_windows_select_thread): Use new functions.
	(net_windows_wait_handle): Likewise.
	(net_windows_done_wait_handle): Likewise.
	(net_windows_close): Likewise.
2007-10-02 16:09:53 +00:00
Joel Brobecker a9762ec78a Switch the license of all .c files to GPLv3.
Switch the license of all .h files to GPLv3.
        Switch the license of all .cc files to GPLv3.
2007-08-23 18:08:50 +00:00
Jerome Guitton 7e71daaa7b * ser-mingw.c (fd_is_file): New function.
(file_select_thread): New function.
	(ser_console_wait_handle): Add special handling for files.
2007-04-19 13:04:30 +00:00
Vladimir Prus 65cc4390f1 Pass stderr of program run with "target remote |"
via gdb_stderr.
        * serial.c (serial_open): Set error_fd to -1.
        * serial.h (struct serial): New field error_fd.
        (struct serial_opts): New field avail.
        * ser-pipe.c (pipe_open): Create another pair
        of sockets.  Pass stderr to gdb.
        * ser-mingw.c (pipe_windows_open): Pass
        PEX_STDERR_TO_PIPE to pex_run.  Initialize
        sd->error_fd.
        (pipe_avail): New.
        (_initialize_ser_windows): Hook pipe_avail.
        * ser-base.c (generic_readchar): Check if there's
        anything in stderr channel and route that to gdb_stderr.
2007-04-08 15:20:07 +00:00
Daniel Jacobowitz 4998c1dfb8 * ser-mingw.c (pipe_windows_close): Move variable initialization back
up.
2007-02-08 16:24:11 +00:00
Vladimir Prus ef7723ebe7 * ser-mingw.c (pipe_windows_open)
(pipe_windows_read, pipe_windows_write): Declare
        variables at the top of the function.
2007-01-30 09:12:43 +00:00
Daniel Jacobowitz 6aba47ca06 Copyright updates for 2007. 2007-01-09 17:59:20 +00:00
Daniel Jacobowitz 774a49c047 * ser-mingw.c (free_pipe_state, pipe_wait_handle): Update
for changes to pipe_select_thread.
	(pipe_done_wait_handle): New.
	(_initialize_ser_windows): Reference it.
2006-10-10 14:23:11 +00:00
Jim Blandy 5f1fb6dcb3 2006-04-11 Jim Blandy <jimb@codesourcery.com>
Add support for 'target remote |' on MinGW.
	* ser-mingw.c (struct pipe_state): New structure.
	(make_pipe_state, free_pipe_state, cleanup_pipe_state)
	(pipe_windows_open, pipe_windows_close, pipe_windows_read)
	(pipe_windows_write, pipe_wait_handle): New functions.
	(_initialize_ser_windows): Register a "pipe" interface based on
	them.
2006-04-25 18:02:13 +00:00
Daniel Jacobowitz c3e2b812d0 * ser-mingw.c: Include <conio.h>.
(struct ser_console_state, struct net_windows_state): Add exit_select,
	have_stopped, thread.
	(pipe_select_thread, console_select_thread)
	(net_windows_select_thread): Don't create a local state copy or
	close stop_select.  Exit on exit_select instead of stop_select.  Set
	have_stopped.
	(console_select_thread): Don't report control keypresses as pending
	input.
	(pipe_select_thread): Allow stop_select to interrupt sleeping.
	(set_console_wait_handle): Create exit_select and have_stopped.
	Save the thread handle.  Check _kbhit before starting a thread.
	(ser_console_done_wait_handle): New.
	(ser_console_close): Close new handles.  Wait for the thread to
	exit.
	(new_windows_select_thread): Assert that an event occurred.
	(net_windows_wait_handle): Check for pending input before starting
	a thread.
	(net_windows_done_wait_handle): New.
	(net_windows_open): Create exit_select and have_stopped.
	Save the thread handle.
	(net_windows_close): Close new handles.  Wait for the thread to
	exit.
	(_intiialize_ser_windows): Register done_wait_handle methods.

	* serial.c [USE_WIN32API] (serial_done_wait_handle): New.
	* serial.h [USE_WIN32API] (struct serial_ops): Add done_wait_handle.
	[USE_WIN32API] (serial_done_wait_handle): New prototype.
	* mingw-hdep.c (gdb_select): Use serial_done_wait_handle.
2006-04-24 21:00:13 +00:00
Daniel Jacobowitz 0ea3f30e21 * NEWS: Mention native Windows support.
* Makefile.in (gdb_select_h, ser_tcp_h): New.
	(ALLDEPFILES): Add ser-mingw.c.
	(event-loop.o, inflow.o, mingw-hdep.o, posix-hdep.o, ser-base.o)
	(ser-tcp.o, ser-unix.o): Update.
	(ser-mingw.o): New rule.
	* configure: Regenerated.
	* configure.ac: Add ser-mingw.o for mingw32.
	* ser-mingw.c: New file.
	* event-loop.c: Include "gdb_select.h".
	(gdb_select): Remove, moved to mingw-hdep.c and posix-hdep.c.
	* ser-base.c: Include "gdb_select.h".
	(ser_base_wait_for): Use gdb_select.
	* serial.c (serial_for_fd): New function.
	(serial_fdopen): Try "terminal" before "hardwire".  Initialize
	the allocated struct serial.
	(serial_wait_handle): New function.
	* serial.h (serial_for_fd, serial_wait_handle): New prototypes.
	(struct serial_ops) [USE_WIN32API]: Add wait_handle.
	* gdb_select.h: New file.
	* ser-tcp.c: Include "ser-tcp.h".  Remove unused "ser-unix.h" include.
	(net_close, net_read_prim, net_write_prim): Make global.
	(net_open): Likewise.  Pass an exception set to select.  Whitespace fix.
	Document why we can not use gdb_select.
	(_initialize_ser_tcp) [USE_WIN32API]: Do not register TCP support here.
	* ser-tcp.h: New file.
	* inflow.c (gdb_has_a_terminal): Don't initialize stdin_serial here.
	(handle_sigio): Use gdb_select.
	(initialize_stdin_serial): New function.
	* terminal.h (initialize_stdin_serial): New prototype.
	* top.c (gdb_init): Call initialize_stdin_serial.
	* mingw-hdep.c (gdb_select): New function, moved from gdb_select in
	event-loop.c.  Add exception condition support.  Use serial_for_fd
	and serial_wait_handle.  Fix timeout handling.
	* posix-hdep.c: Include "gdb_select.h".
	(gdb_select): New function.
	* remote-st.c (connect_command): Use gdb_select.
	* ser-unix.c: Include "gdb_select.h".
	(hardwire_send_break, wait_for): Use gdb_select.
2006-02-10 22:01:43 +00:00