From: Pedro Alves <pedro@codesourcery.com>
To: archer@sourceware.org
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>,
Chris Moller <cmoller@redhat.com>
Subject: Re: Proof-of-concept on fd-connected linux-nat.c server
Date: Sun, 10 May 2009 10:25:00 -0000 [thread overview]
Message-ID: <200905101125.24435.pedro@codesourcery.com> (raw)
In-Reply-To: <20090509151556.GA17252@host0.dyn.jankratochvil.net>
On Saturday 09 May 2009 16:15:56, Jan Kratochvil wrote:
> tried to implement the file-descriptor based client for GDB as a possible
> client for the kernel module which would interface utrace. Based on my mail:
> http://sourceware.org/ml/archer/2009-q1/msg00257.html
>
> http://sourceware.org/gdb/wiki/ArcherBranchManagement
> branch archer-jankratochvil-stork
>
> Its current client is communicating over pipe with ./stork-server which is
> ptrace based. Expecting there would be no stork-server and this pipe would be
> some socket communicating directly with kernel.
>
> Currently waitpid()+ptrace() get implemented remotely over the pipe/fd/wire as
> both need to be called from the same process to work properly with the goal to
> exercise proper remote waitpid() events handling in GDB. Sure the abstraction
> layer should include also kill/tkill etc. but these are not interesting from
> the events processing point of view.
You're reinventing a remote protocol, and, at the wrong layer, IMO.
> Just while writing the code remembered Tom Tromey was discussing maybe GDB
> should always run using gdbserver and this gdbserver could be whole in the
> kernel. While writing this code I found out I just duplicate the gdbserver
> client/protocol/server functionality. While the gdbserver protocol is
> ASCII=inefficient I do not think it is worth fixing on hardware nowadays
> - expensive is inefficient/excessive symbols reading, not the ASCII hex
> mangling/demangling.
I seriously, highly doubt that ascii is a real inefficiency here. For
bulk memory transfers, the remote protocol has binary packets --- 8-bit
with a few bytes needing an escape sequence (see X packet). Far, far
more important is roundtrip latency. OTOH, an ascii protocol makes
debugging what's going on between client/server much much easier
than reading binary blobs. The single most important time
sensitive operation when debugging is single-stepping speed, and
that's mostly dominated by roundtrips.
> What do you think about implementing gdbserver.ko?
What would this be solving?
> (Unfortunately I have not much knowledge on gdbserver.)
In all seriousness, I think that you're going the wrong direction
entirely. I really suggest you get acquainted with the remote
protocol and gdbserver, before coming up with a new solution.
> * Removing local queue (waitpid_queue) would be IMHO good even for current FSF
> GDB HEAD -
It's going to happen:
http://sourceware.org/ml/gdb-patches/2009-04/msg00125.html
(that's not the final patch, but, I'll get to it this week probably)
--
Pedro Alves
next prev parent reply other threads:[~2009-05-10 10:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-09 15:16 Jan Kratochvil
2009-05-09 19:50 ` Chris Moller
2009-05-10 9:19 ` Jan Kratochvil
2009-05-10 10:25 ` Pedro Alves [this message]
2009-05-10 14:59 ` Jan Kratochvil
2009-05-10 15:42 ` Pedro Alves
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=200905101125.24435.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=archer@sourceware.org \
--cc=cmoller@redhat.com \
--cc=jan.kratochvil@redhat.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).