GDB (xrefs)
Classes | Macros | Typedefs | Enumerations | Functions
/tmp/gdb-7.10/gdb/serial.h File Reference

Go to the source code of this file.

Classes

struct  serial
 
struct  serial_ops
 

Macros

#define SERIAL_1_STOPBITS   1
 
#define SERIAL_1_AND_A_HALF_STOPBITS   2 /* 1.5 bits, snicker... */
 
#define SERIAL_2_STOPBITS   3
 
#define GDBPARITY_NONE   0
 
#define GDBPARITY_ODD   1
 
#define GDBPARITY_EVEN   2
 

Typedefs

typedef void * serial_ttystate
 
typedef void( serial_event_ftype) (struct serial *scb, void *context)
 

Enumerations

enum  serial_rc { SERIAL_ERROR = -1, SERIAL_TIMEOUT = -2, SERIAL_EOF = -3 }
 

Functions

struct serialserial_open (const char *name)
 
int serial_is_open (struct serial *scb)
 
struct serialserial_for_fd (int fd)
 
struct serialserial_fdopen (const int fd)
 
void serial_close (struct serial *scb)
 
void serial_ref (struct serial *scb)
 
void serial_unref (struct serial *scb)
 
int gdb_pipe (int fildes[2])
 
int serial_pipe (struct serial *scbs[2])
 
void serial_un_fdopen (struct serial *scb)
 
int serial_readchar (struct serial *scb, int timeout)
 
int serial_write (struct serial *scb, const void *buf, size_t count)
 
void serial_printf (struct serial *desc, const char *,...) ATTRIBUTE_PRINTF(2
 
void int serial_drain_output (struct serial *)
 
int serial_flush_output (struct serial *)
 
int serial_flush_input (struct serial *)
 
int serial_send_break (struct serial *scb)
 
void serial_raw (struct serial *scb)
 
serial_ttystate serial_get_tty_state (struct serial *scb)
 
serial_ttystate serial_copy_tty_state (struct serial *scb, serial_ttystate ttystate)
 
int serial_set_tty_state (struct serial *scb, serial_ttystate ttystate)
 
void serial_print_tty_state (struct serial *scb, serial_ttystate ttystate, struct ui_file *)
 
int serial_noflush_set_tty_state (struct serial *scb, serial_ttystate new_ttystate, serial_ttystate old_ttystate)
 
int serial_setbaudrate (struct serial *scb, int rate)
 
int serial_setstopbits (struct serial *scb, int num)
 
int serial_setparity (struct serial *scb, int parity)
 
int serial_can_async_p (struct serial *scb)
 
int serial_is_async_p (struct serial *scb)
 
void serial_async (struct serial *scb, serial_event_ftype *handler, void *context)
 
void serial_debug (struct serial *scb, int debug_p)
 
int serial_debug_p (struct serial *scb)
 
void serial_add_interface (const struct serial_ops *optable)
 
void serial_log_command (struct target_ops *self, const char *)
 

Macro Definition Documentation

#define GDBPARITY_EVEN   2

Definition at line 191 of file serial.h.

Referenced by hardwire_setparity(), ser_windows_setparity(), and set_parity().

#define GDBPARITY_NONE   0

Definition at line 189 of file serial.h.

Referenced by hardwire_setparity(), ser_windows_setparity(), and set_parity().

#define GDBPARITY_ODD   1

Definition at line 190 of file serial.h.

Referenced by hardwire_setparity(), ser_windows_setparity(), and set_parity().

#define SERIAL_1_AND_A_HALF_STOPBITS   2 /* 1.5 bits, snicker... */

Definition at line 184 of file serial.h.

Referenced by dos_setstopbits(), hardwire_setstopbits(), and ser_windows_setstopbits().

#define SERIAL_1_STOPBITS   1
#define SERIAL_2_STOPBITS   3

Definition at line 185 of file serial.h.

Referenced by dos_setstopbits(), hardwire_setstopbits(), and ser_windows_setstopbits().

Typedef Documentation

typedef void( serial_event_ftype) (struct serial *scb, void *context)

Definition at line 211 of file serial.h.

typedef void* serial_ttystate

Definition at line 27 of file serial.h.

Enumeration Type Documentation

enum serial_rc
Enumerator
SERIAL_ERROR 
SERIAL_TIMEOUT 
SERIAL_EOF 

Definition at line 94 of file serial.h.

Function Documentation

int gdb_pipe ( int  fildes[2])

Definition at line 873 of file ser-go32.c.

References gdb_socketpair_cloexec().

Referenced by serial_pipe().

void serial_add_interface ( const struct serial_ops optable)
void serial_async ( struct serial scb,
serial_event_ftype handler,
void *  context 
)
int serial_can_async_p ( struct serial scb)

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)
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().

void serial_debug ( struct serial scb,
int  debug_p 
)

Definition at line 562 of file serial.c.

References serial::debug_p.

int serial_debug_p ( struct serial scb)

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().

void int serial_drain_output ( struct serial )

Definition at line 449 of file serial.c.

References serial_ops::drain_output, and serial::ops.

Referenced by print_flush().

struct serial* serial_fdopen ( const int  fd)

Definition at line 291 of file serial.c.

References serial_fdopen_ops().

Referenced by initialize_stdin_serial(), and print_flush().

int serial_flush_input ( struct serial )
int serial_flush_output ( struct serial )

Definition at line 455 of file serial.c.

References serial_ops::flush_output, and serial::ops.

Referenced by mips_initialize().

struct serial* serial_for_fd ( int  fd)

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)
int serial_is_async_p ( struct serial scb)

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().

int serial_is_open ( struct serial scb)

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 *   
)
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().

struct serial* serial_open ( const char *  name)
int serial_pipe ( struct serial scbs[2])

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  
)

Definition at line 500 of file serial.c.

References serial::ops, and serial_ops::print_tty_state.

Referenced by child_terminal_info().

void serial_printf ( struct serial desc,
const char *  ,
  ... 
)
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().

int serial_readchar ( struct serial scb,
int  timeout 
)
void serial_ref ( struct serial scb)

Definition at line 358 of file serial.c.

References serial::refcnt.

Referenced by run_async_handler_and_reschedule().

int serial_send_break ( struct serial scb)
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().

int serial_setbaudrate ( struct serial scb,
int  rate 
)

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().

int serial_setparity ( struct serial scb,
int  parity 
)

Definition at line 530 of file serial.c.

References serial::ops, and serial_ops::setparity.

Referenced by monitor_open(), and remote_open_1().

int serial_setstopbits ( struct serial scb,
int  num 
)

Definition at line 522 of file serial.c.

References serial::ops, and serial_ops::setstopbits.

Referenced by monitor_open().

void serial_un_fdopen ( struct serial scb)

Definition at line 346 of file serial.c.

References do_serial_close().

Referenced by print_flush().

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().

int serial_write ( struct serial scb,
const void *  buf,
size_t  count 
)