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"
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 | net_windows_state |
Macros | |
#define | CancelIo dyn_CancelIo |
Typedefs | |
typedef DWORD WINAPI(* | thread_fn_type) (void *) |
Enumerations | |
enum | select_thread_state { STS_STARTED, STS_STOPPED } |
Functions | |
void | _initialize_ser_windows (void) |
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 void | cleanup_pipe_state (void *untyped) |
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) |
Variables | |
static BOOL WINAPI(* | CancelIo )(HANDLE) |
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 46 of file ser-mingw.c.
Referenced by _initialize_ser_windows(), and ser_windows_close().
typedef DWORD WINAPI(* thread_fn_type) (void *) |
Definition at line 456 of file ser-mingw.c.
enum select_thread_state |
Enumerator | |
---|---|
STS_STARTED | |
STS_STOPPED |
Definition at line 393 of file ser-mingw.c.
void _initialize_ser_windows | ( | void | ) |
Definition at line 1366 of file ser-mingw.c.
References CancelIo, and serial_add_interface().
|
static |
Definition at line 858 of file ser-mingw.c.
References free_pipe_state(), and cleanup_check::ps.
Referenced by pipe_windows_open().
|
static |
Definition at line 534 of file ser-mingw.c.
References ser_console_state::except_event, serial::fd, ser_console_state::have_stopped, ser_console_state::read_event, arm-linux::record(), select_thread_wait(), serial::state, and ser_console_state::stop_select.
Referenced by ser_console_wait_handle().
|
static |
Definition at line 461 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 483 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().
Definition at line 628 of file ser-mingw.c.
Referenced by ser_console_wait_handle().
Definition at line 619 of file ser-mingw.c.
Referenced by ser_console_wait_handle().
|
static |
Definition at line 680 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 832 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 cleanup_pipe_state(), pipe_windows_close(), and pipe_windows_fdopen().
Definition at line 1064 of file ser-mingw.c.
|
static |
Definition at line 818 of file ser-mingw.c.
References ser_console_state::except_event, cleanup_check::ps, 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 1227 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 1193 of file ser-mingw.c.
References net_windows_state::base, serial::state, and stop_select_thread().
Definition at line 1201 of file ser-mingw.c.
References net_windows_state::base, create_select_thread(), serial::fd, net_open(), net_windows_select_thread(), net_windows_state::sock_event, serial::state, and xmalloc().
|
static |
Definition at line 1105 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().
Definition at line 1084 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 1174 of file ser-mingw.c.
References net_windows_state::base, ser_console_state::except_event, net_windows_socket_check_pending(), ser_console_state::read_event, start_select_thread(), serial::state, and ser_console_state::stop_select.
Definition at line 1052 of file ser-mingw.c.
References BOOL.
|
static |
Definition at line 1040 of file ser-mingw.c.
References cleanup_check::ps, ser_console_state::read_event, serial::state, stop_select_thread(), and pipe_state::wait.
|
static |
Definition at line 637 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 1019 of file ser-mingw.c.
References create_select_thread(), ser_console_state::except_event, pipe_select_thread(), cleanup_check::ps, ser_console_state::read_event, start_select_thread(), serial::state, ser_console_state::stop_select, and pipe_state::wait.
|
static |
Definition at line 961 of file ser-mingw.c.
References free_pipe_state(), cleanup_check::ps, and serial::state.
Definition at line 936 of file ser-mingw.c.
References serial::fd, free_pipe_state(), pipe_state::input, make_pipe_state(), pipe_state::output, cleanup_check::ps, and serial::state.
Definition at line 866 of file ser-mingw.c.
References _, cleanup_pipe_state(), discard_cleanups(), do_cleanups(), err, error(), serial::error_fd, error_no_arg(), serial::fd, gdb_buildargv(), pipe_state::input, make_cleanup(), make_cleanup_freeargv(), make_pipe_state(), pipe_state::output, pipe_state::pex, cleanup_check::ps, safe_strerror(), and serial::state.
Definition at line 974 of file ser-mingw.c.
References available, serial::buf, and serial::fd.
Definition at line 997 of file ser-mingw.c.
References pipe_state::input, cleanup_check::ps, and serial::state.
|
static |
Definition at line 437 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 772 of file ser-mingw.c.
References destroy_select_thread(), serial::state, and xfree().
|
static |
Definition at line 761 of file ser-mingw.c.
References serial::state, and stop_select_thread().
|
static |
Definition at line 789 of file ser-mingw.c.
References serial::fd, ser_console_ttystate::is_a_tty, and xmalloc().
|
static |
Definition at line 706 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(), ser_console_state::read_event, start_select_thread(), serial::state, ser_console_state::stop_select, and xmalloc().
|
static |
Definition at line 248 of file ser-mingw.c.
References CancelIo, ser_windows_state::except_event, serial::fd, ser_windows_state::ov, serial::state, and xfree().
Definition at line 107 of file ser-mingw.c.
References serial::fd.
Definition at line 123 of file ser-mingw.c.
References serial::fd.
Definition at line 115 of file ser-mingw.c.
References serial::fd.
Definition at line 52 of file ser-mingw.c.
References ser_windows_state::except_event, serial::fd, ser_windows_state::ov, serial::state, and xmalloc().
|
static |
Definition at line 148 of file ser-mingw.c.
References _, serial::current_timeout, serial::fd, and warning().
Definition at line 324 of file ser-mingw.c.
References serial::buf, serial::fd, ser_windows_state::in_progress, ser_windows_state::ov, and serial::state.
Definition at line 131 of file ser-mingw.c.
References serial::fd.
Definition at line 234 of file ser-mingw.c.
References serial::fd, and rate.
Definition at line 202 of file ser-mingw.c.
References serial::fd, GDBPARITY_EVEN, GDBPARITY_NONE, GDBPARITY_ODD, and internal_warning().
Definition at line 173 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 272 of file ser-mingw.c.
References _, ser_windows_state::except_event, serial::fd, gdb_assert, ser_windows_state::in_progress, ser_windows_state::lastCommMask, ser_windows_state::ov, serial::state, status, and warning().
Definition at line 356 of file ser-mingw.c.
References serial::fd, and ser_windows_state::ov.
|
static |
Definition at line 503 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 516 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 1241 of file ser-mingw.c.
|
static |
Definition at line 1305 of file ser-mingw.c.
|
static |
Definition at line 1336 of file ser-mingw.c.
|
static |
Definition at line 1274 of file ser-mingw.c.