GDB (xrefs)
|
#include "defs.h"
#include <ctype.h>
#include "serial.h"
#include "gdbcmd.h"
#include "cli/cli-utils.h"
Go to the source code of this file.
Macros | |
#define | SERIAL_BREAK 1235 |
Typedefs | |
typedef const struct serial_ops * | serial_ops_p |
Variables | |
static unsigned int | global_serial_debug_p |
static const char * | serial_logbase = logbase_ascii |
static int | serial_current_type = 0 |
static struct cmd_list_element * | serial_set_cmdlist |
static struct cmd_list_element * | serial_show_cmdlist |
int | baud_rate = -1 |
int | serial_parity = GDBPARITY_NONE |
static const char | parity_none [] = "none" |
static const char | parity_odd [] = "odd" |
static const char | parity_even [] = "even" |
static const char *const | parity_enums [] |
static const char * | parity = parity_none |
#define SERIAL_BREAK 1235 |
Definition at line 66 of file serial.c.
Referenced by serial_logchar(), and serial_send_break().
typedef const struct serial_ops* serial_ops_p |
void _initialize_serial | ( | void | ) |
Definition at line 674 of file serial.c.
References _, add_com(), add_prefix_cmd(), add_setshow_enum_cmd(), add_setshow_filename_cmd(), add_setshow_zinteger_cmd(), add_setshow_zuinteger_cmd(), class_maintenance, class_obscure, global_serial_debug_p, no_class, serial_baud_show_cmd(), serial_logbase, serial_set_cmd(), serial_show_cmd(), set_parity(), setdebuglist, setlist, showdebuglist, and showlist.
DEF_VEC_P | ( | serial_ops_p | ) |
Definition at line 297 of file serial.c.
References serial::async_handler, serial::bufp, serial_ops::close, fputs_unfiltered(), serial::name, serial::next, serial::ops, serial_async(), serial_current_type, serial_unref(), ui_file_delete(), and xfree().
Referenced by serial_close(), and serial_un_fdopen().
void serial_add_interface | ( | const struct serial_ops * | optable | ) |
Definition at line 162 of file serial.c.
References VEC_safe_push.
Referenced by _initialize_ser_dos(), _initialize_ser_hardwire(), _initialize_ser_pipe(), _initialize_ser_tcp(), and _initialize_ser_windows().
void serial_async | ( | struct serial * | scb, |
serial_event_ftype * | handler, | ||
void * | context | ||
) |
Definition at line 548 of file serial.c.
References serial_ops::async, serial::async_context, serial::async_handler, and serial::ops.
Referenced by do_serial_close(), gdbpy_initialize_events(), and remote_async().
|
static |
Definition at line 642 of file serial.c.
References _, and fprintf_filtered().
Referenced by _initialize_serial().
Definition at line 536 of file serial.c.
References serial_ops::async, and serial::ops.
Referenced by remote_can_async_p().
void serial_close | ( | struct serial * | scb | ) |
Definition at line 340 of file serial.c.
References do_serial_close().
Referenced by close_ports(), common_open(), m32r_close(), monitor_close(), monitor_open(), remote_close(), and remote_open_1().
serial_ttystate serial_copy_tty_state | ( | struct serial * | scb, |
serial_ttystate | ttystate | ||
) |
Definition at line 488 of file serial.c.
References serial_ops::copy_tty_state, and serial::ops.
Referenced by child_terminal_init_with_pgrp(), and copy_terminal_info().
Definition at line 562 of file serial.c.
References serial::debug_p.
Definition at line 568 of file serial.c.
References serial::debug_p, and global_serial_debug_p.
Referenced by reschedule(), ser_base_async(), serial_readchar(), and serial_write().
Definition at line 449 of file serial.c.
References serial_ops::drain_output, and serial::ops.
Referenced by print_flush().
Definition at line 291 of file serial.c.
References serial_fdopen_ops().
Referenced by initialize_stdin_serial(), and print_flush().
|
static |
Definition at line 251 of file serial.c.
References serial::async_context, serial::async_handler, serial::async_state, serial::buf, serial::bufcnt, serial::bufp, serial::debug_p, serial::error_fd, serial::fd, serial_ops::fdopen, serial::name, serial::next, serial::ops, serial::refcnt, and serial_interface_lookup().
Referenced by serial_fdopen(), and serial_pipe().
Definition at line 461 of file serial.c.
References serial_ops::flush_input, and serial::ops.
Referenced by load_srec(), mips_initialize(), mips_load_srec(), monitor_open(), pmon_load_fast(), and remote_open_1().
Definition at line 455 of file serial.c.
References serial_ops::flush_output, and serial::ops.
Referenced by mips_initialize().
Definition at line 171 of file serial.c.
References serial::fd, and serial::next.
Referenced by gdb_select().
serial_ttystate serial_get_tty_state | ( | struct serial * | scb | ) |
Definition at line 482 of file serial.c.
References serial_ops::get_tty_state, and serial::ops.
Referenced by child_terminal_ours_1(), gdb_has_a_terminal(), gdb_save_tty_state(), and set_initial_gdb_ttystate().
|
static |
Definition at line 149 of file serial.c.
References serial_ops::name, and VEC_iterate.
Referenced by serial_fdopen_ops(), serial_open(), and serial_pipe().
Definition at line 542 of file serial.c.
References serial_ops::async, serial::async_handler, and serial::ops.
Referenced by remote_is_async_p(), reschedule(), and serial_readchar().
Definition at line 352 of file serial.c.
References serial::bufp.
Referenced by run_async_handler_and_reschedule().
void serial_log_command | ( | struct target_ops * | self, |
const char * | cmd | ||
) |
Definition at line 132 of file serial.c.
References fputs_unfiltered(), gdb_flush(), and serial_current_type.
Referenced by _initialize_remote_mips(), init_base_monitor_ops(), init_m32r_ops(), and init_remote_ops().
Definition at line 69 of file serial.c.
References fprintf_unfiltered(), fputc_unfiltered(), fputs_unfiltered(), safe_strerror(), SERIAL_BREAK, serial_current_type, SERIAL_EOF, SERIAL_ERROR, serial_logbase, and SERIAL_TIMEOUT.
Referenced by serial_readchar(), serial_send_break(), and serial_write().
int serial_noflush_set_tty_state | ( | struct serial * | scb, |
serial_ttystate | new_ttystate, | ||
serial_ttystate | old_ttystate | ||
) |
Definition at line 508 of file serial.c.
References serial_ops::noflush_set_tty_state, and serial::ops.
Referenced by child_terminal_ours_1().
Definition at line 185 of file serial.c.
References serial::async_context, serial::async_handler, serial::async_state, serial::buf, serial::bufcnt, serial::bufp, serial::debug_p, serial::error_fd, gdb_fopen(), name, serial::name, serial::next, serial_ops::open, serial::ops, perror_with_name(), serial::refcnt, serial_interface_lookup(), skip_spaces_const(), startswith(), and xfree().
Referenced by common_open(), m32r_open(), monitor_open(), and remote_serial_open().
Definition at line 595 of file serial.c.
References gdb_pipe(), serial_fdopen_ops(), and serial_interface_lookup().
Referenced by gdbpy_initialize_events().
void serial_print_tty_state | ( | struct serial * | scb, |
serial_ttystate | ttystate, | ||
struct ui_file * | stream | ||
) |
Definition at line 500 of file serial.c.
References serial::ops, and serial_ops::print_tty_state.
Referenced by child_terminal_info().
Definition at line 435 of file serial.c.
References serial::buf, serial_write(), xfree(), and xstrvprintf().
void serial_raw | ( | struct serial * | scb | ) |
Definition at line 476 of file serial.c.
References serial_ops::go_raw, and serial::ops.
Referenced by common_open(), monitor_open(), and remote_open_1().
Definition at line 372 of file serial.c.
References _, fprintf_unfiltered(), gdb_flush(), gdb_stdlog, internal_error(), serial::ops, serial_ops::readchar, serial_debug_p(), serial_is_async_p(), and serial_logchar().
Referenced by gdbpy_run_events(), get_ack(), m32r_insert_breakpoint(), m32r_wait(), m32r_xfer_memory(), mips_expect_timeout(), mips_initialize(), mips_readchar(), monitor_readchar(), pmon_check_ack(), readchar(), recv_data(), and sdistatus_command().
void serial_ref | ( | struct serial * | scb | ) |
Definition at line 358 of file serial.c.
References serial::refcnt.
Referenced by run_async_handler_and_reschedule().
Definition at line 467 of file serial.c.
References serial::ops, serial_ops::send_break, SERIAL_BREAK, and serial_logchar().
Referenced by mips_initialize(), mips_kill(), monitor_stop(), and send_interrupt_sequence().
|
static |
Definition at line 621 of file serial.c.
References all_commands, gdb_stdout, help_list(), and printf_unfiltered().
Referenced by _initialize_serial().
int serial_set_tty_state | ( | struct serial * | scb, |
serial_ttystate | ttystate | ||
) |
Definition at line 494 of file serial.c.
References serial::ops, and serial_ops::set_tty_state.
Referenced by child_terminal_inferior().
Definition at line 516 of file serial.c.
References serial::ops, and serial_ops::setbaudrate.
Referenced by common_open(), monitor_open(), and remote_open_1().
Definition at line 530 of file serial.c.
References serial::ops, and serial_ops::setparity.
Referenced by monitor_open(), and remote_open_1().
Definition at line 522 of file serial.c.
References serial::ops, and serial_ops::setstopbits.
Referenced by monitor_open().
|
static |
Definition at line 629 of file serial.c.
References cmd_show_list().
Referenced by _initialize_serial().
void serial_un_fdopen | ( | struct serial * | scb | ) |
void serial_unref | ( | struct serial * | scb | ) |
Definition at line 364 of file serial.c.
References serial::refcnt, and xfree().
Referenced by do_serial_close(), and run_async_handler_and_reschedule().
Definition at line 403 of file serial.c.
References serial::buf, fprintf_unfiltered(), gdb_flush(), gdb_stdlog, serial::ops, serial_debug_p(), serial_logchar(), and serial_ops::write.
Referenced by gdbpy_post_event(), load_srec(), m32r_insert_breakpoint(), m32r_wait(), m32r_xfer_memory(), mips_enter_debug(), mips_initialize(), mips_kill(), mips_receive_packet(), mips_send_command(), mips_send_packet(), monitor_read_memory(), monitor_write(), pmon_download(), remote_serial_write(), remote_start_remote(), send_data(), send_srec(), ser_tcp_send_break(), and serial_printf().
|
static |
Definition at line 663 of file serial.c.
References GDBPARITY_EVEN, GDBPARITY_NONE, and GDBPARITY_ODD.
Referenced by _initialize_serial().
VEC | ( | serial_ops_p | ) |
int baud_rate = -1 |
Definition at line 639 of file serial.c.
Referenced by captured_main(), common_open(), monitor_files_info(), monitor_open(), and remote_open_1().
|
static |
Definition at line 30 of file serial.c.
Referenced by _initialize_serial(), and serial_debug_p().
|
static |
|
static |
Definition at line 60 of file serial.c.
Referenced by do_serial_close(), serial_log_command(), and serial_logchar().
|
static |
Definition at line 57 of file serial.c.
Referenced by _initialize_serial(), and serial_logchar().
int serial_parity = GDBPARITY_NONE |
Definition at line 651 of file serial.c.
Referenced by monitor_open(), and remote_open_1().
|
static |
|
static |