From: Pedro Alves <pedro@codesourcery.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Joel Brobecker <brobecker@adacore.com>,
Daniel Jacobowitz <drow@false.org>,
teawater <teawater@gmail.com>
Subject: Re: [RFA] Reverse Debugging, 1/5
Date: Mon, 06 Oct 2008 22:35:00 -0000 [thread overview]
Message-ID: <200810062334.55187.pedro@codesourcery.com> (raw)
In-Reply-To: <48EA8D02.4030107@vmware.com>
On Monday 06 October 2008 23:11:14, Michael Snyder wrote:
> Where I've been saying "target" in this thread, I
> have been meaning "the target_ops implementation",
> eg. (but not limited to) remote.c
"target" is such an overloaded word in GDB lingo ...
> > The question to me is --- when/why does the target (as in, the debug
> > API abstraction) ever need to know about the current direction that
> > it couldn't get from the core's request?
>
> At this interface layer, the core's requests look like:
>
> target_set_exec_dir
> target_resume
> target_wait
> [repeat]
> target_set_exec_dir
>
> So there may be many resume/wait calls between calls to set_exec_dir.
> This means that the target_ops module MUST remember the state, whether
> or not the core remembers it also.
That's all nice and pretty, for sync. For async, you'll
have:
<event loop>
command
target_set_exec_dir
target_resume
<event loop>
target_wait
target_resume
<event loop>
target_wait
target_resume
target_set_exec_dir
<event loop>
At some point, if you support more than one inferior behind the
target_ops interface, you'll start asking yourself "why didn't I
make the interfaces fully complete and go rely on global state?"
Or even, in the single-inferior case:
<event loop>
command
target_set_exec_dir
target_resume
<event loop>
target_wait
target_resume
target_set_exec_dir
<event loop>
target_wait
handle_inferior_event
error >>>>>>>>>> what's the target execution
>>>>>>>>>> state after this, where was it stored?
<event loop>
But it's OK, we can always come back to this later, because
you're making the remote protocol stateless, which is good
enough for me for now. ;-)
--
Pedro Alves
prev parent reply other threads:[~2008-10-06 22:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-01 19:18 Michael Snyder
2008-10-03 19:04 ` Doug Evans
2008-10-03 20:44 ` Michael Snyder
2008-10-06 20:30 ` Joel Brobecker
2008-10-06 21:03 ` Michael Snyder
2008-10-06 21:12 ` Daniel Jacobowitz
2008-10-06 21:20 ` Michael Snyder
2008-10-06 21:25 ` Daniel Jacobowitz
2008-10-06 21:46 ` Michael Snyder
2008-10-06 22:23 ` Joel Brobecker
2008-10-07 0:45 ` Michael Snyder
2008-10-07 3:49 ` Joel Brobecker
2008-10-07 18:30 ` Michael Snyder
2008-10-08 0:16 ` Joel Brobecker
2008-10-08 0:32 ` Michael Snyder
2008-10-08 0:55 ` Joel Brobecker
2008-10-08 1:46 ` Michael Snyder
2008-10-08 2:59 ` Joel Brobecker
2008-10-07 5:02 ` Daniel Jacobowitz
2008-10-06 21:45 ` Pedro Alves
2008-10-06 22:14 ` Michael Snyder
2008-10-06 22:35 ` Pedro Alves [this message]
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=200810062334.55187.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.com \
--cc=teawater@gmail.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