From: Andrew Cagney <ac131313@cygnus.com>
To: Todd Whitesel <toddpw@best.com>
Cc: msalter@redhat.com, gdb@sources.redhat.com
Subject: Re: gdb/remote - I/O
Date: Fri, 30 Mar 2001 09:23:00 -0000 [thread overview]
Message-ID: <3AC4C124.9CF81823@cygnus.com> (raw)
In-Reply-To: <200103300709.XAA28219@shell17.ba.best.com>
Todd Whitesel wrote:
> I prefer the implementation where target I/O is treated like a general
> syscall request, which always blocks on the host. After all, it's really
> for debugging and bootstrapping, not production -- and you gain a lot of
> flexibility by doing it this way.
syscall? Ah, you're thinking of UNIX :-)
> On the target, a syscall acts just like a breakpoint except that some
> extra "I'm a syscall!" information is sent up too. For example, the
> syscall number and the first three argument registers, which covers
> all of your basic syscalls.
> The target then just sits and waits to be manipulated with register/memory
> commands, and eventually gets a command sequence telling it to write the
> return register and 'errno flag' register and to continue.
>
> On the host, a target that stops on a syscall gets processed through logic
> which feels somewhat like the "should we continue stepping or not?" paths
> in The Code Formerly Known As WaitForInferior. The host translates the
> syscall to native bit-flags and such and attempts to execute it, including
> simulated I/O (you need some minimal buffering here, nothing complicated).
I was waiting for someone to head down that path :-)
While a ``really cool feature'' I think, like the other proposal to make
things truely bi-directional it is getting away from the current
protocol's principal objective - to be as simple as possible.
I don't think a ``syscall'' mechanism would need any protocol changes
(just a minor reimplementation of GDB's target stack ;-) I'd expect
something like a new target layer that would set a breakpoint on
syscall() and then intercept any thread-stopped event for that
breakpoint. The layer would then manipulate the target and resume it.
I think the emphasis here should be on identifying just sufficient
functionality to provide the primative console. Mark's point about the
target not having a break mechanism is the key - my original proposal
was flawed since it assume that GDB could directly interrupt the target.
Andrew
next prev parent reply other threads:[~2001-03-30 9:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-23 15:36 Andrew Cagney
2001-03-29 16:27 ` Mark Salter
[not found] ` <3ABF9077.DFC22AE7@cygnus.com>
[not found] ` <200103261954.f2QJsBg15093@deneb.localdomain>
[not found] ` <3ABFA8D1.DA0D2EAE@redhat.com>
[not found] ` <3AC0C9DF.CB1BC2D9@cygnus.com>
2001-03-29 16:27 ` Fernando Nasser
2001-03-29 16:27 ` Andrew Cagney
2001-03-29 23:10 ` Todd Whitesel
2001-03-30 9:23 ` Andrew Cagney [this message]
[not found] ` <5mhf0fov3q.fsf@jtc.redback.com>
2001-03-30 9:48 ` Andrew Cagney
2001-04-06 11:28 ` Andrew Cagney
2001-04-06 11:47 ` Fernando Nasser
2001-04-06 12:56 ` J.T. Conklin
2001-04-07 16:02 ` Frank Ch. Eigler
2001-04-09 10:43 ` J.T. Conklin
2001-05-14 8:55 ` Andrew Cagney
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=3AC4C124.9CF81823@cygnus.com \
--to=ac131313@cygnus.com \
--cc=gdb@sources.redhat.com \
--cc=msalter@redhat.com \
--cc=toddpw@best.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