|
GDB (xrefs)
|
#include "defs.h"#include "serial.h"#include "ser-base.h"#include "ser-tcp.h"#include <windows.h>#include <conio.h>#include <fcntl.h>#include <unistd.h>#include <sys/types.h>#include "command.h"#include "gdbsupport/buildargv.h"Go to the source code of this file.
Classes | |
| struct | ser_windows_state |
| struct | ser_console_state |
| struct | ser_console_ttystate |
| struct | pipe_state |
| struct | pipe_state_destroyer |
| struct | net_windows_state |
Macros | |
| #define | CancelIo dyn_CancelIo |
Typedefs | |
| typedef BOOL WINAPI() | CancelIo_ftype(HANDLE) |
| typedef DWORD WINAPI(* | thread_fn_type) (void *) |
| typedef std::unique_ptr< pipe_state, pipe_state_destroyer > | pipe_state_up |
Enumerations | |
| enum | select_thread_state { STS_STARTED , STS_STOPPED } |
Functions | |
| static int | ser_windows_open (struct serial *scb, const char *name) |
| static int | ser_windows_drain_output (struct serial *scb) |
| static int | ser_windows_flush_output (struct serial *scb) |
| static int | ser_windows_flush_input (struct serial *scb) |
| static int | ser_windows_send_break (struct serial *scb) |
| static void | ser_windows_raw (struct serial *scb) |
| static int | ser_windows_setstopbits (struct serial *scb, int num) |
| static int | ser_windows_setparity (struct serial *scb, int parity) |
| static int | ser_windows_setbaudrate (struct serial *scb, int rate) |
| static void | ser_windows_close (struct serial *scb) |
| static void | ser_windows_wait_handle (struct serial *scb, HANDLE *read, HANDLE *except) |
| static int | ser_windows_read_prim (struct serial *scb, size_t count) |
| static int | ser_windows_write_prim (struct serial *scb, const void *buf, size_t len) |
| static void | select_thread_wait (struct ser_console_state *state) |
| static void | create_select_thread (thread_fn_type thread_fn, struct serial *scb, struct ser_console_state *state) |
| static void | destroy_select_thread (struct ser_console_state *state) |
| static void | start_select_thread (struct ser_console_state *state) |
| static void | stop_select_thread (struct ser_console_state *state) |
| static DWORD WINAPI | console_select_thread (void *arg) |
| static int | fd_is_pipe (int fd) |
| static int | fd_is_file (int fd) |
| static DWORD WINAPI | pipe_select_thread (void *arg) |
| static DWORD WINAPI | file_select_thread (void *arg) |
| static void | ser_console_wait_handle (struct serial *scb, HANDLE *read, HANDLE *except) |
| static void | ser_console_done_wait_handle (struct serial *scb) |
| static void | ser_console_close (struct serial *scb) |
| static serial_ttystate | ser_console_get_tty_state (struct serial *scb) |
| static struct pipe_state * | make_pipe_state (void) |
| static void | free_pipe_state (struct pipe_state *ps) |
| static int | pipe_windows_open (struct serial *scb, const char *name) |
| static int | pipe_windows_fdopen (struct serial *scb, int fd) |
| static void | pipe_windows_close (struct serial *scb) |
| static int | pipe_windows_read (struct serial *scb, size_t count) |
| static int | pipe_windows_write (struct serial *scb, const void *buf, size_t count) |
| static void | pipe_wait_handle (struct serial *scb, HANDLE *read, HANDLE *except) |
| static void | pipe_done_wait_handle (struct serial *scb) |
| static int | pipe_avail (struct serial *scb, int fd) |
| int | gdb_pipe (int pdes[2]) |
| static int | net_windows_socket_check_pending (struct serial *scb) |
| static DWORD WINAPI | net_windows_select_thread (void *arg) |
| static void | net_windows_wait_handle (struct serial *scb, HANDLE *read, HANDLE *except) |
| static void | net_windows_done_wait_handle (struct serial *scb) |
| static int | net_windows_open (struct serial *scb, const char *name) |
| static void | net_windows_close (struct serial *scb) |
| void | _initialize_ser_windows () |
Variables | |
| static CancelIo_ftype * | CancelIo |
| static const struct serial_ops | hardwire_ops |
| static const struct serial_ops | tty_ops |
| static const struct serial_ops | pipe_ops |
| static const struct serial_ops | tcp_ops |
| #define CancelIo dyn_CancelIo |
Definition at line 45 of file ser-mingw.c.
| typedef BOOL WINAPI() CancelIo_ftype(HANDLE) |
Definition at line 46 of file ser-mingw.c.
| typedef std::unique_ptr<pipe_state, pipe_state_destroyer> pipe_state_up |
Definition at line 860 of file ser-mingw.c.
| typedef DWORD WINAPI(* thread_fn_type) (void *) |
Definition at line 450 of file ser-mingw.c.
| enum select_thread_state |
| Enumerator | |
|---|---|
| STS_STARTED | |
| STS_STOPPED | |
Definition at line 387 of file ser-mingw.c.
| void _initialize_ser_windows | ( | ) |
Definition at line 1354 of file ser-mingw.c.
References CancelIo, hardwire_ops, pipe_ops, serial_add_interface(), tcp_ops, and tty_ops.
|
static |
Definition at line 528 of file ser-mingw.c.
References ser_console_state::except_event, serial::fd, ser_console_state::have_stopped, ser_console_state::read_event, select_thread_wait(), serial::state, and ser_console_state::stop_select.
Referenced by ser_console_wait_handle().
|
static |
Definition at line 455 of file ser-mingw.c.
References ser_console_state::except_event, ser_console_state::exit_select, ser_console_state::have_started, ser_console_state::have_stopped, ser_console_state::read_event, ser_console_state::start_select, ser_console_state::stop_select, STS_STOPPED, ser_console_state::thread, and ser_console_state::thread_state.
Referenced by net_windows_open(), pipe_wait_handle(), and ser_console_wait_handle().
|
static |
Definition at line 477 of file ser-mingw.c.
References ser_console_state::except_event, ser_console_state::exit_select, ser_console_state::have_started, ser_console_state::have_stopped, ser_console_state::read_event, ser_console_state::start_select, ser_console_state::stop_select, and ser_console_state::thread.
Referenced by free_pipe_state(), net_windows_close(), and ser_console_close().
|
static |
Definition at line 627 of file ser-mingw.c.
Referenced by ser_console_wait_handle().
|
static |
Definition at line 618 of file ser-mingw.c.
Referenced by ser_console_wait_handle().
|
static |
Definition at line 678 of file ser-mingw.c.
References ser_console_state::except_event, serial::fd, ser_console_state::have_stopped, ser_console_state::read_event, select_thread_wait(), and serial::state.
Referenced by ser_console_wait_handle().
|
static |
Definition at line 827 of file ser-mingw.c.
References destroy_select_thread(), pipe_state::input, pipe_state::output, pipe_state::pex, ser_console_state::read_event, pipe_state::wait, and xfree().
Referenced by pipe_state_destroyer::operator()(), pipe_windows_close(), and pipe_windows_fdopen().
| int gdb_pipe | ( | int | pdes[2] | ) |
Definition at line 1057 of file ser-mingw.c.
|
static |
Definition at line 814 of file ser-mingw.c.
References ser_console_state::except_event, ser_console_state::read_event, ser_console_state::start_select, ser_console_state::stop_select, and pipe_state::wait.
Referenced by pipe_windows_fdopen(), and pipe_windows_open().
|
static |
Definition at line 1218 of file ser-mingw.c.
References net_windows_state::base, destroy_select_thread(), net_close(), net_windows_state::sock_event, serial::state, and xfree().
|
static |
Definition at line 1186 of file ser-mingw.c.
References net_windows_state::base, serial::state, and stop_select_thread().
|
static |
Definition at line 1194 of file ser-mingw.c.
References net_windows_state::base, create_select_thread(), serial::fd, name, net_open(), net_windows_select_thread(), net_windows_state::sock_event, and serial::state.
|
static |
Definition at line 1098 of file ser-mingw.c.
References net_windows_state::base, ser_console_state::except_event, serial::fd, ser_console_state::have_stopped, net_windows_socket_check_pending(), select_thread_wait(), net_windows_state::sock_event, serial::state, and ser_console_state::stop_select.
Referenced by net_windows_open().
|
static |
Definition at line 1077 of file ser-mingw.c.
References available, net_windows_state::base, ser_console_state::except_event, serial::fd, ser_console_state::read_event, and serial::state.
Referenced by net_windows_select_thread(), and net_windows_wait_handle().
|
static |
Definition at line 1167 of file ser-mingw.c.
References net_windows_state::base, ser_console_state::except_event, net_windows_socket_check_pending(), read(), ser_console_state::read_event, start_select_thread(), serial::state, and ser_console_state::stop_select.
|
static |
Definition at line 1045 of file ser-mingw.c.
References BOOL.
|
static |
Definition at line 1033 of file ser-mingw.c.
References ser_console_state::read_event, serial::state, stop_select_thread(), and pipe_state::wait.
|
static |
Definition at line 636 of file ser-mingw.c.
References ser_console_state::except_event, serial::fd, ser_console_state::have_stopped, ser_console_state::read_event, select_thread_wait(), serial::state, and ser_console_state::stop_select.
Referenced by pipe_wait_handle(), and ser_console_wait_handle().
|
static |
Definition at line 1012 of file ser-mingw.c.
References create_select_thread(), ser_console_state::except_event, pipe_select_thread(), read(), ser_console_state::read_event, start_select_thread(), serial::state, ser_console_state::stop_select, and pipe_state::wait.
|
static |
Definition at line 954 of file ser-mingw.c.
References free_pipe_state(), and serial::state.
|
static |
Definition at line 929 of file ser-mingw.c.
References serial::fd, free_pipe_state(), pipe_state::input, make_pipe_state(), pipe_state::output, and serial::state.
|
static |
Definition at line 863 of file ser-mingw.c.
References err, serial::error_fd, error_no_arg(), serial::fd, make_pipe_state(), name, and serial::state.
|
static |
Definition at line 967 of file ser-mingw.c.
References available, serial::buf, and serial::fd.
|
static |
Definition at line 990 of file ser-mingw.c.
References pipe_state::input, and serial::state.
|
static |
Definition at line 431 of file ser-mingw.c.
References ser_console_state::exit_select, ser_console_state::have_started, and ser_console_state::start_select.
Referenced by console_select_thread(), file_select_thread(), net_windows_select_thread(), and pipe_select_thread().
|
static |
Definition at line 768 of file ser-mingw.c.
References destroy_select_thread(), serial::state, and xfree().
|
static |
Definition at line 757 of file ser-mingw.c.
References serial::state, and stop_select_thread().
|
static |
Definition at line 785 of file ser-mingw.c.
References serial::fd, and ser_console_ttystate::is_a_tty.
|
static |
Definition at line 703 of file ser-mingw.c.
References console_select_thread(), create_select_thread(), ser_console_state::except_event, serial::fd, fd_is_file(), fd_is_pipe(), file_select_thread(), pipe_select_thread(), read(), ser_console_state::read_event, start_select_thread(), serial::state, and ser_console_state::stop_select.
|
static |
Definition at line 244 of file ser-mingw.c.
References CancelIo, ser_windows_state::except_event, serial::fd, ser_windows_state::ov, serial::state, and xfree().
|
static |
Definition at line 106 of file ser-mingw.c.
References serial::fd.
|
static |
Definition at line 122 of file ser-mingw.c.
References serial::fd.
|
static |
Definition at line 114 of file ser-mingw.c.
References serial::fd.
|
static |
Definition at line 52 of file ser-mingw.c.
References ser_windows_state::except_event, serial::fd, name, ser_windows_state::ov, and serial::state.
|
static |
Definition at line 147 of file ser-mingw.c.
References serial::fd.
|
static |
Definition at line 320 of file ser-mingw.c.
References serial::buf, serial::fd, ser_windows_state::in_progress, ser_windows_state::ov, and serial::state.
|
static |
Definition at line 130 of file ser-mingw.c.
References serial::fd.
|
static |
Definition at line 230 of file ser-mingw.c.
References serial::fd, and rate.
|
static |
Definition at line 199 of file ser-mingw.c.
References serial::fd, GDBPARITY_EVEN, GDBPARITY_NONE, GDBPARITY_ODD, and parity.
|
static |
Definition at line 170 of file ser-mingw.c.
References serial::fd, SERIAL_1_AND_A_HALF_STOPBITS, SERIAL_1_STOPBITS, and SERIAL_2_STOPBITS.
|
static |
Definition at line 268 of file ser-mingw.c.
References ser_windows_state::except_event, serial::fd, ser_windows_state::in_progress, ser_windows_state::lastCommMask, ser_windows_state::ov, read(), serial::state, and status.
|
static |
Definition at line 351 of file ser-mingw.c.
References serial::fd, and ser_windows_state::ov.
|
static |
Definition at line 497 of file ser-mingw.c.
References ser_console_state::have_started, ser_console_state::start_select, STS_STARTED, and ser_console_state::thread_state.
Referenced by net_windows_wait_handle(), pipe_wait_handle(), and ser_console_wait_handle().
|
static |
Definition at line 510 of file ser-mingw.c.
References ser_console_state::have_stopped, ser_console_state::stop_select, STS_STARTED, STS_STOPPED, and ser_console_state::thread_state.
Referenced by net_windows_done_wait_handle(), pipe_done_wait_handle(), and ser_console_done_wait_handle().
|
static |
Definition at line 47 of file ser-mingw.c.
|
static |
Definition at line 1232 of file ser-mingw.c.
Referenced by _initialize_ser_windows().
|
static |
Definition at line 1294 of file ser-mingw.c.
Referenced by _initialize_ser_windows().
|
static |
Definition at line 1324 of file ser-mingw.c.
Referenced by _initialize_ser_windows().
|
static |
Definition at line 1264 of file ser-mingw.c.
Referenced by _initialize_ser_windows().