From 8775bb90ebd4f68b1aaa8525a9bc435123e8c1a5 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Wed, 3 Sep 2008 23:54:19 +0000 Subject: [PATCH] 2008-09-03 Angela Marie Thomas * ser-tcp.c (ser_tcp_send_break): New function. (_initialize_ser_tcp): Use ser_tcp_send_break. * ser-tcp.h (ser_tcp_send_break): New prototype. 2008-09-03 Angela Marie Thomas * gdb.texinfo (Interrupts): Mention TCP interface for sending BREAK. --- gdb/ChangeLog | 6 ++++++ gdb/doc/ChangeLog | 5 +++++ gdb/doc/gdb.texinfo | 7 ++++--- gdb/ser-mingw.c | 2 +- gdb/ser-tcp.c | 9 ++++++++- gdb/ser-tcp.h | 1 + 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 856fed0895e..e9f8b83c282 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2008-09-03 Angela Marie Thomas + + * ser-tcp.c (ser_tcp_send_break): New function. + (_initialize_ser_tcp): Use ser_tcp_send_break. + * ser-tcp.h (ser_tcp_send_break): New prototype. + 2008-09-03 Ulrich Weigand * spu-tdep.c (spu_push_dummy_call): Update all stack pointer slots diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index bb1ac1f0c23..21605744af9 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,8 @@ +2008-09-03 Angela Marie Thomas + + * gdb.texinfo (Interrupts): Mention TCP interface for + sending BREAK. + 2008-08-26 Ulrich Weigand * gdb.texinfo (Commands to Specify Files): Document "remote:" diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 60fc4b96c63..4a36fec6ce5 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -26054,9 +26054,10 @@ control of which is specified via @value{GDBN}'s @samp{remotebreak} setting (@pxref{set remotebreak}). The precise meaning of @code{BREAK} is defined by the transport -mechanism and may, in fact, be undefined. @value{GDBN} does -not currently define a @code{BREAK} mechanism for any of the network -interfaces. +mechanism and may, in fact, be undefined. @value{GDBN} does not +currently define a @code{BREAK} mechanism for any of the network +interfaces except for TCP, in which case @value{GDBN} sends the +@code{telnet} BREAK sequence. @samp{Ctrl-C}, on the other hand, is defined and implemented for all transport mechanisms. It is represented by sending the single byte diff --git a/gdb/ser-mingw.c b/gdb/ser-mingw.c index a4d5752ba44..98b8368e953 100644 --- a/gdb/ser-mingw.c +++ b/gdb/ser-mingw.c @@ -1256,7 +1256,7 @@ _initialize_ser_windows (void) ops->write = ser_base_write; ops->flush_output = ser_base_flush_output; ops->flush_input = ser_base_flush_input; - ops->send_break = ser_base_send_break; + ops->send_break = ser_tcp_send_break; ops->go_raw = ser_base_raw; ops->get_tty_state = ser_base_get_tty_state; ops->set_tty_state = ser_base_set_tty_state; diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c index 6dd83426845..dcf288da59f 100644 --- a/gdb/ser-tcp.c +++ b/gdb/ser-tcp.c @@ -257,6 +257,13 @@ net_write_prim (struct serial *scb, const void *buf, size_t count) return send (scb->fd, buf, count, 0); } +int +ser_tcp_send_break (struct serial *scb) +{ + /* Send telnet IAC and BREAK characters. */ + return (serial_write (scb, "\377\363", 2)); +} + void _initialize_ser_tcp (void) { @@ -276,7 +283,7 @@ _initialize_ser_tcp (void) ops->write = ser_base_write; ops->flush_output = ser_base_flush_output; ops->flush_input = ser_base_flush_input; - ops->send_break = ser_base_send_break; + ops->send_break = ser_tcp_send_break; ops->go_raw = ser_base_raw; ops->get_tty_state = ser_base_get_tty_state; ops->set_tty_state = ser_base_set_tty_state; diff --git a/gdb/ser-tcp.h b/gdb/ser-tcp.h index 2fd505207f6..f43db2eabdc 100644 --- a/gdb/ser-tcp.h +++ b/gdb/ser-tcp.h @@ -26,5 +26,6 @@ extern int net_open (struct serial *scb, const char *name); extern void net_close (struct serial *scb); extern int net_read_prim (struct serial *scb, size_t count); extern int net_write_prim (struct serial *scb, const void *buf, size_t count); +extern int ser_tcp_send_break (struct serial *scb); #endif -- 2.30.2