Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: Michael Snyder <msnyder@vmware.com>,
	  Joel Brobecker <brobecker@adacore.com>,
	 "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	  Pedro Alves <pedro@codesourcery.com>,
	 teawater <teawater@gmail.com>
Subject: Re: [RFA] Reverse Debugging, 1/5
Date: Mon, 06 Oct 2008 21:46:00 -0000	[thread overview]
Message-ID: <48EA868E.3070404@vmware.com> (raw)
In-Reply-To: <20081006212504.GB31085@caradoc.them.org>

Daniel Jacobowitz wrote:
> On Mon, Oct 06, 2008 at 02:17:25PM -0700, Michael Snyder wrote:
>> You're going to send "to_set_direction" to the target,
>> and then you're going to assume that you know what the
>> state is later on, rather than asking the target?  What
>> if the target gets it wrong?  Now you're out of sync.
> 
> Huh?  No, part of every resume.

It's not part of resume.  That was the very first design
decision.  We didn't modify resume, because it would require
modifying every existing target.  Instead, we added a set
execution direction method, which has to be called before
resume (and after, depending).

So right now there are two ways this gets invoked:

1) By a one-shot reverse command, reverse-xxx (where
xxx is step/stepi/next/nexti/continue/finish/until).
In that case, we do:
     target_set_exec_dir (reverse);
     step/next/finish/continue/???
     target_set_exec_dir (forward);
2) By the user command set exec-direction, in which case
we leave it in the user-supplied state until the user
changes it again.

All resumes get the implied direction that was specified
in the last target_set_exec_dir.  Resume doesn't have
an extra parameter, but if you do reverse-step, for
instance, there may be many resumes between the two
calls to target_set_exec_dir.



>> If we do keep the direction-state in the core, where would
>> we put it?  In the ecs?  In a global variable in infrun?
> 
> In infrun, the same as any other user supplied execution state.
> For instance the scheduler-locking setting.

I'm ok with that, if that's what we decide.

But understand -- the target HAS to remember this state,
so now we are duplicating state.  Unles we go back and
reverse that very first design decision and add a parameter
to resume -- which will be a lot of work.



  reply	other threads:[~2008-10-06 21:46 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 [this message]
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

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=48EA868E.3070404@vmware.com \
    --to=msnyder@vmware.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.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