Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Jakob Engblom" <jakob@virtutech.com>
To: "'Vladimir Prus'" <vladimir@codesourcery.com>,
		"'Michael Snyder'" <msnyder@vmware.com>
Cc: <gdb-patches@sourceware.org>
Subject: RE: GDB MI Reverse Commands added [1 of 3]
Date: Thu, 17 Dec 2009 14:40:00 -0000	[thread overview]
Message-ID: <008f01ca7f26$d9e97140$8dbc53c0$@com> (raw)
In-Reply-To: <200912161056.58856.vladimir@codesourcery.com>

> > > +/* continue in reverse direction:
> > > +   XXX: code duplicated from reverse.c */
> > > +
> > > +static void
> > > +exec_direction_default (void *notused)
> > > +{
> > > +  /* Return execution direction to default state.  */
> > > +  execution_direction = EXEC_FORWARD;
> > > +}
> >
> > It should be straight-forward to make the function in reverse.c globally
> > visible, and remove this copy-paste.

I just updated my cvs tree, and it seems that the main reverse function has changed its name.  As far as I can tell (I did  not do all of this code myself, rather I have to blame some colleagues), the current reversing function that we want to call is:

static void
exec_reverse_once (char *cmd, char *args, int from_tty)
{
...
}

From 

void
mi_cmd_exec_continue (char *command, char **argv, int argc)
{
  if (argc > 0 && strcmp (argv[0], "--reverse") == 0)
    exec_reverse_continue (argv + 1, argc - 1);
  else
    exec_continue (argv, argc);
}

Where exec_reverse_continue() should be replaced with exec_reverse_once().

Can someone familiar with the main reverse code illuminate me on how to call into the reverse code in teh right way?  It seems that the reverse.c code has already changed from the code that was (bad style) copied into mi-main.c...  which is exactly what we want to avoid in the first place. 

Or is the logical thing to do from MI to just call

static void
reverse_continue (char *args, int from_tty)
{
  exec_reverse_once ("continue", args, from_tty);
}

As the implementation of reverse continue?  This does looks like the we submitted has rotted since the patch was submitted... 

/jakob


  reply	other threads:[~2009-12-17 14:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-26 14:38 Jakob Engblom
2009-08-27  1:13 ` Michael Snyder
2009-08-31 13:26   ` Jakob Engblom
2009-08-31 19:56     ` Michael Snyder
2009-09-01  6:37       ` Jakob Engblom
2009-09-01 19:08         ` Michael Snyder
2009-08-27  2:06 ` Michael Snyder
2009-08-31 13:15   ` Jakob Engblom
2009-08-31 20:29   ` Tom Tromey
2009-09-02  8:16   ` Vladimir Prus
2009-09-10 21:09     ` Michael Snyder
2009-09-10 21:10       ` Michael Snyder
2010-01-13 20:32     ` Jakob Engblom
2010-01-13 20:36       ` Vladimir Prus
2010-01-13 20:44         ` Michael Snyder
2009-12-15 19:39   ` Michael Snyder
2009-12-16  7:54     ` Vladimir Prus
2009-12-16  7:57       ` Vladimir Prus
2009-12-17 14:40         ` Jakob Engblom [this message]
2009-12-21 10:06           ` Vladimir Prus
2009-12-22 11:34             ` Jakob Engblom
2009-12-22 11:48               ` Vladimir Prus
2010-01-13 13:15                 ` Jakob Engblom
2009-12-22 18:22               ` Michael Snyder
2010-01-13 13:16                 ` Jakob Engblom
2010-02-12 21:33                 ` Michael Snyder
2009-08-27  3:11 ` Hui Zhu

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='008f01ca7f26$d9e97140$8dbc53c0$@com' \
    --to=jakob@virtutech.com \
    --cc=gdb-patches@sourceware.org \
    --cc=msnyder@vmware.com \
    --cc=vladimir@codesourcery.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