* serial.h (gdb_pipe, serial_pipe): Declare.
authorPedro Alves <palves@redhat.com>
Fri, 20 Aug 2010 18:49:20 +0000 (18:49 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 20 Aug 2010 18:49:20 +0000 (18:49 +0000)
commit58f07bae9540e81791b2ed039ba4c630fadf0af1
treebe72b87d23fb9547d1de77725065b5d6dc06fff2
parent3da10d80f8da9ea96493eda226136221a9209c10
* serial.h (gdb_pipe, serial_pipe): Declare.
* serial.c (serial_interface_lookup): Take a const char pointer.
(serial_fdopen): Rename to ...
(serial_fdopen_ops): ... this.  Add an OPS parameter and use it.
Call the OPS' fdopen function if there is one.
(serial_fdopen): Rewrite as wrapper to serial_fdopen_ops.
(serial_pipe): New.
(struct serial_ops) <fdopen>: New field.

* ser-mingw.c (free_pipe_state):
(free_pipe_state): Close output on non-pex pipes.
(pipe_windows_fdopen): New.
(gdb_pipe): New.
(_initialize_ser_windows): Register pipe_windows_fdopen.
* ser-go32.c (gdb_pipe): New.
* ser-pipe.c (pipe_close): Close file descriptor even if there's
no state pointer.
(pipe_ops): Delete.
(gdb_pipe): New.
gdb/ChangeLog
gdb/ser-go32.c
gdb/ser-mingw.c
gdb/ser-pipe.c
gdb/serial.c
gdb/serial.h