|
GDB (xrefs)
|
#include "defs.h"#include "serial.h"#include "ser-base.h"#include "event-loop.h"#include "gdb_select.h"#include "gdb_sys_time.h"Go to the source code of this file.
Enumerations | |
| enum | { FD_SCHEDULED = -1, NOTHING_SCHEDULED = -2 } |
Functions | |
| static void | reschedule (struct serial *scb) |
| static void | run_async_handler_and_reschedule (struct serial *scb) |
| static void | fd_event (int error, void *context) |
| static void | push_event (void *context) |
| static int | ser_base_wait_for (struct serial *scb, int timeout) |
| static void | ser_base_read_error_fd (struct serial *scb, int close_fd) |
| static void | handle_error_fd (int error, gdb_client_data client_data) |
| static int | do_ser_base_readchar (struct serial *scb, int timeout) |
| int | generic_readchar (struct serial *scb, int timeout, int(do_readchar)(struct serial *scb, int timeout)) |
| int | ser_base_readchar (struct serial *scb, int timeout) |
| int | ser_base_write (struct serial *scb, const void *buf, size_t count) |
| int | ser_base_flush_output (struct serial *scb) |
| int | ser_base_flush_input (struct serial *scb) |
| int | ser_base_send_break (struct serial *scb) |
| int | ser_base_drain_output (struct serial *scb) |
| void | ser_base_raw (struct serial *scb) |
| serial_ttystate | ser_base_get_tty_state (struct serial *scb) |
| serial_ttystate | ser_base_copy_tty_state (struct serial *scb, serial_ttystate ttystate) |
| int | ser_base_set_tty_state (struct serial *scb, serial_ttystate ttystate) |
| void | ser_base_print_tty_state (struct serial *scb, serial_ttystate ttystate, struct ui_file *stream) |
| int | ser_base_setbaudrate (struct serial *scb, int rate) |
| int | ser_base_setstopbits (struct serial *scb, int num) |
| int | ser_base_setparity (struct serial *scb, int parity) |
| void | ser_base_async (struct serial *scb, int async_p) |
Variables | |
| static timer_handler_func | push_event |
| static handler_func | fd_event |
| anonymous enum |
| Enumerator | |
|---|---|
| FD_SCHEDULED | |
| NOTHING_SCHEDULED | |
Definition at line 45 of file ser-base.c.
|
static |
Definition at line 336 of file ser-base.c.
References serial::buf, serial::bufcnt, serial::bufp, deprecated_ui_loop_hook, serial::ops, serial_ops::read_prim, ser_base_read_error_fd(), ser_base_wait_for(), SERIAL_EOF, SERIAL_ERROR, SERIAL_TIMEOUT, and status.
Referenced by ser_base_readchar().
|
static |
Definition at line 154 of file ser-base.c.
References serial::buf, serial::bufcnt, serial::bufp, error(), serial::ops, serial_ops::read_prim, run_async_handler_and_reschedule(), SERIAL_EOF, and SERIAL_ERROR.
| int generic_readchar | ( | struct serial * | scb, |
| int | timeout, | ||
| int(do_readchar)(struct serial *scb, int timeout) | |||
| ) |
Definition at line 426 of file ser-base.c.
References serial::bufcnt, serial::bufp, reschedule(), ser_base_read_error_fd(), SERIAL_EOF, SERIAL_ERROR, and SERIAL_TIMEOUT.
Referenced by ser_base_readchar().
|
static |
Definition at line 322 of file ser-base.c.
References ser_base_read_error_fd().
Referenced by ser_base_async().
|
static |
Definition at line 197 of file ser-base.c.
References serial::async_state, NOTHING_SCHEDULED, and run_async_handler_and_reschedule().
|
static |
Definition at line 65 of file ser-base.c.
References add_file_handler(), serial::async_state, serial::bufcnt, create_timer(), delete_file_handler(), delete_timer(), serial::fd, fd_event, FD_SCHEDULED, fprintf_unfiltered(), gdb_stdlog, NOTHING_SCHEDULED, push_event, serial_debug_p(), and serial_is_async_p().
Referenced by generic_readchar(), run_async_handler_and_reschedule(), and ser_base_async().
|
static |
Definition at line 128 of file ser-base.c.
References serial::async_context, serial::async_handler, reschedule(), serial_is_open(), serial_ref(), and serial_unref().
Referenced by fd_event(), and push_event().
| void ser_base_async | ( | struct serial * | scb, |
| int | async_p | ||
| ) |
Definition at line 586 of file ser-base.c.
References add_file_handler(), serial::async_state, delete_file_handler(), delete_timer(), serial::error_fd, serial::fd, FD_SCHEDULED, fprintf_unfiltered(), gdb_stdlog, handle_error_fd(), NOTHING_SCHEDULED, reschedule(), and serial_debug_p().
| serial_ttystate ser_base_copy_tty_state | ( | struct serial * | scb, |
| serial_ttystate | ttystate | ||
| ) |
Definition at line 542 of file ser-base.c.
References XNEW.
| int ser_base_drain_output | ( | struct serial * | scb | ) |
Definition at line 523 of file ser-base.c.
| int ser_base_flush_input | ( | struct serial * | scb | ) |
Definition at line 504 of file ser-base.c.
References serial::buf, serial::bufcnt, serial::bufp, and SERIAL_ERROR.
Referenced by hardwire_flush_input().
| int ser_base_flush_output | ( | struct serial * | scb | ) |
Definition at line 498 of file ser-base.c.
| serial_ttystate ser_base_get_tty_state | ( | struct serial * | scb | ) |
Definition at line 535 of file ser-base.c.
References XNEW.
| void ser_base_print_tty_state | ( | struct serial * | scb, |
| serial_ttystate | ttystate, | ||
| struct ui_file * | stream | ||
| ) |
Definition at line 555 of file ser-base.c.
| void ser_base_raw | ( | struct serial * | scb | ) |
Definition at line 529 of file ser-base.c.
|
static |
Definition at line 261 of file ser-base.c.
References serial_ops::avail, delete_file_handler(), serial::error_fd, fputs_unfiltered(), gdb_assert, GDB_MI_MSG_WIDTH, gdb_stderr, serial::ops, read(), and serial_is_async_p().
Referenced by do_ser_base_readchar(), generic_readchar(), and handle_error_fd().
| int ser_base_readchar | ( | struct serial * | scb, |
| int | timeout | ||
| ) |
Definition at line 468 of file ser-base.c.
References do_ser_base_readchar(), and generic_readchar().
| int ser_base_send_break | ( | struct serial * | scb | ) |
Definition at line 517 of file ser-base.c.
| int ser_base_set_tty_state | ( | struct serial * | scb, |
| serial_ttystate | ttystate | ||
| ) |
Definition at line 549 of file ser-base.c.
| int ser_base_setbaudrate | ( | struct serial * | scb, |
| int | rate | ||
| ) |
Definition at line 564 of file ser-base.c.
| int ser_base_setparity | ( | struct serial * | scb, |
| int | parity | ||
| ) |
Definition at line 578 of file ser-base.c.
| int ser_base_setstopbits | ( | struct serial * | scb, |
| int | num | ||
| ) |
Definition at line 570 of file ser-base.c.
|
static |
Definition at line 214 of file ser-base.c.
References serial::fd, interruptible_select(), QUIT, SERIAL_ERROR, and SERIAL_TIMEOUT.
Referenced by do_ser_base_readchar().
| int ser_base_write | ( | struct serial * | scb, |
| const void * | buf, | ||
| size_t | count | ||
| ) |
Definition at line 474 of file ser-base.c.
References serial::ops, QUIT, and serial_ops::write_prim.
|
static |
Definition at line 33 of file ser-base.c.
Referenced by reschedule().
|
static |
Definition at line 32 of file ser-base.c.
Referenced by reschedule().
1.8.14