From: Michael Snyder <msnyder@specifix.com>
To: angela@releasedominatrix.com
Cc: gdb-patches@sourceware.org
Subject: Re: patch to send telnet BREAK for remote-over-tcp
Date: Wed, 03 Sep 2008 04:36:00 -0000 [thread overview]
Message-ID: <1220416529.3389.2.camel@localhost.localdomain> (raw)
In-Reply-To: <20080829225247.92696FE88A@dzur.releasedominatrix.com>
I think this looks right, but I'd love to get another opinion.
Daniel? Anybody?
On Fri, 2008-08-29 at 15:52 -0700, Angela Marie Thomas wrote:
> Hoping this falls under "obvious" as I don't currently have an assigment
> on file. Simply put, this changes the current noop behavior to using the
> telnet BREAK sequence instead. This allows remote debugging of kgdb
> enabled BSD kernels through a TCP serial connection (e.g. Portmaster).
> Built and tested for --host=i686-pc-linux-gnu --target=mips64-linux
>
> 2008-08-29 Angela Marie Thomas <angela@releasedominatrix.com>
>
> * 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.
>
> Index: gdb/ser-tcp.c
> ===================================================================
> RCS file: /services/cvs/cvsroot/gnusense/gdb/gdb/ser-tcp.c,v
> retrieving revision 1.1.1.4
> diff -b -t -w -u -p -r1.1.1.4 ser-tcp.c
> --- gdb/ser-tcp.c 7 Jul 2006 16:06:15 -0000 1.1.1.4
> +++ gdb/ser-tcp.c 29 Aug 2008 17:29:02 -0000
> @@ -278,7 +278,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;
> @@ -292,4 +292,11 @@ _initialize_ser_tcp (void)
> ops->write_prim = net_write_prim;
> serial_add_interface (ops);
> #endif /* USE_WIN32API */
> +}
> +
> +int
> +ser_tcp_send_break (struct serial *scb)
> +{
> + /* Send telnet IAC and BREAK characters. */
> + return(serial_write(scb, "\377\363", 2));
> }
> Index: gdb/ser-tcp.h
> ===================================================================
> RCS file: /services/cvs/cvsroot/gnusense/gdb/gdb/ser-tcp.h,v
> retrieving revision 1.1.1.1
> diff -b -t -w -u -p -r1.1.1.1 ser-tcp.h
> --- gdb/ser-tcp.h 7 Jul 2006 16:05:44 -0000 1.1.1.1
> +++ gdb/ser-tcp.h 29 Aug 2008 17:29:02 -0000
> @@ -28,5 +28,6 @@ extern int net_open (struct serial *scb,
> 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
next prev parent reply other threads:[~2008-09-03 4:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-29 22:53 Angela Marie Thomas
2008-09-03 4:36 ` Michael Snyder [this message]
2008-09-03 13:12 ` Daniel Jacobowitz
2008-09-03 17:13 ` Michael Snyder
2008-09-03 17:30 ` Daniel Jacobowitz
2008-09-03 20:29 ` Michael Snyder
2008-09-03 20:41 ` Eli Zaretskii
2008-09-03 23:55 ` Michael Snyder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1220416529.3389.2.camel@localhost.localdomain \
--to=msnyder@specifix.com \
--cc=angela@releasedominatrix.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox