mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
gdb/:
* ser-unix.c (show_serial_hwflow): New function. (hardwire_raw): Add hardware flow control support. (_initialize_ser_hardwire): Add "set/show remoteflow". * Makefile.in (ser-unix.o): Depend on $(gdbcmd_h). * NEWS: Document the new command. gdb/doc/: * gdb.texinfo (Remote Configuration): Document "set/show remoteflow".
This commit is contained in:
parent
0e9517a90d
commit
23776285b7
@ -1,3 +1,12 @@
|
||||
2007-05-22 Chris Dearman <chris@mips.com>
|
||||
Maciej W. Rozycki <macro@mips.com>
|
||||
|
||||
* ser-unix.c (show_serial_hwflow): New function.
|
||||
(hardwire_raw): Add hardware flow control support.
|
||||
(_initialize_ser_hardwire): Add "set/show remoteflow".
|
||||
* Makefile.in (ser-unix.o): Depend on $(gdbcmd_h).
|
||||
* NEWS: Document the new command.
|
||||
|
||||
2007-05-21 Ulrich Weigand <uweigand@de.ibm.com>
|
||||
|
||||
* config/i386/tm-linux.h (sys_quotactl): Do not define.
|
||||
|
@ -2541,7 +2541,7 @@ ser-pipe.o: ser-pipe.c $(defs_h) $(serial_h) $(ser_base_h) $(ser_unix_h) \
|
||||
ser-tcp.o: ser-tcp.c $(defs_h) $(serial_h) $(ser_base_h) $(ser_tcp_h) \
|
||||
$(gdb_string_h)
|
||||
ser-unix.o: ser-unix.c $(defs_h) $(serial_h) $(ser_base_h) $(ser_unix_h) \
|
||||
$(terminal_h) $(gdb_select_h) $(gdb_string_h)
|
||||
$(terminal_h) $(gdb_select_h) $(gdb_string_h) $(gdbcmd_h)
|
||||
ser-mingw.o: ser-mingw.c $(defs_h) $(serial_h) $(ser_base_h) \
|
||||
$(ser_tcp_h) $(gdb_assert_h) $(gdb_string_h)
|
||||
sh64-tdep.o: sh64-tdep.c $(defs_h) $(frame_h) $(frame_base_h) \
|
||||
|
5
gdb/NEWS
5
gdb/NEWS
@ -39,6 +39,11 @@ has been rewritten to use the standard GDB remote protocol.
|
||||
|
||||
* New commands
|
||||
|
||||
set remoteflow
|
||||
show remoteflow
|
||||
Enable or disable hardware flow control (RTS/CTS) on the serial port
|
||||
when debugging using remote targets.
|
||||
|
||||
set mem inaccessible-by-default
|
||||
show mem inaccessible-by-default
|
||||
If the target supplies a memory map, for instance via the remote
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-05-22 Maciej W. Rozycki <macro@mips.com>
|
||||
|
||||
* gdb.texinfo (Remote Configuration): Document "set/show
|
||||
remoteflow".
|
||||
|
||||
2007-05-16 Daniel Jacobowitz <dan@codesourcery.com>
|
||||
|
||||
* gdb.texinfo (MIPS): Remove documentation for set mips saved-gpreg-size,
|
||||
|
@ -12792,6 +12792,16 @@ expect to see @samp{Ctrl-C} as the interrupt signal.
|
||||
Show whether @value{GDBN} sends @code{BREAK} or @samp{Ctrl-C} to
|
||||
interrupt the remote program.
|
||||
|
||||
@item set remoteflow on
|
||||
@itemx set remoteflow off
|
||||
@kindex set remoteflow
|
||||
Enable or disable hardware flow control (@code{RTS}/@code{CTS})
|
||||
on the serial port used to communicate to the remote target.
|
||||
|
||||
@item show remoteflow
|
||||
@kindex show remoteflow
|
||||
Show the current setting of hardware flow control.
|
||||
|
||||
@item set remotelogbase @var{base}
|
||||
Set the base (a.k.a.@: radix) of logging serial protocol
|
||||
communications to @var{base}. Supported values of @var{base} are:
|
||||
|
@ -33,6 +33,7 @@
|
||||
|
||||
#include "gdb_select.h"
|
||||
#include "gdb_string.h"
|
||||
#include "gdbcmd.h"
|
||||
|
||||
#ifdef HAVE_TERMIOS
|
||||
|
||||
@ -40,6 +41,18 @@ struct hardwire_ttystate
|
||||
{
|
||||
struct termios termios;
|
||||
};
|
||||
|
||||
#ifdef CRTSCTS
|
||||
/* Boolean to explicitly enable or disable h/w flow control. */
|
||||
static int serial_hwflow;
|
||||
static void
|
||||
show_serial_hwflow (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
fprintf_filtered (file, _("Hardware flow control is %s.\n"), value);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* termios */
|
||||
|
||||
#ifdef HAVE_TERMIO
|
||||
@ -387,6 +400,19 @@ hardwire_raw (struct serial *scb)
|
||||
state.termios.c_lflag = 0;
|
||||
state.termios.c_cflag &= ~(CSIZE | PARENB);
|
||||
state.termios.c_cflag |= CLOCAL | CS8;
|
||||
#ifdef CRTSCTS
|
||||
/* h/w flow control. */
|
||||
if (serial_hwflow)
|
||||
state.termios.c_cflag |= CRTSCTS;
|
||||
else
|
||||
state.termios.c_cflag &= ~CRTSCTS;
|
||||
#ifdef CRTS_IFLOW
|
||||
if (serial_hwflow)
|
||||
state.termios.c_cflag |= CRTS_IFLOW;
|
||||
else
|
||||
state.termios.c_cflag &= ~CRTS_IFLOW;
|
||||
#endif
|
||||
#endif
|
||||
state.termios.c_cc[VMIN] = 0;
|
||||
state.termios.c_cc[VTIME] = 0;
|
||||
#endif
|
||||
@ -892,6 +918,20 @@ _initialize_ser_hardwire (void)
|
||||
ops->read_prim = ser_unix_read_prim;
|
||||
ops->write_prim = ser_unix_write_prim;
|
||||
serial_add_interface (ops);
|
||||
|
||||
#ifdef HAVE_TERMIOS
|
||||
#ifdef CRTSCTS
|
||||
add_setshow_boolean_cmd ("remoteflow", no_class,
|
||||
&serial_hwflow, _("\
|
||||
Set use of hardware flow control for remote serial I/O."), _("\
|
||||
Show use of hardware flow control for remote serial I/O."), _("\
|
||||
Enable or disable hardware flow control (RTS/CTS) on the serial port\n\
|
||||
when debugging using remote targets."),
|
||||
NULL,
|
||||
show_serial_hwflow,
|
||||
&setlist, &showlist);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user