Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Jakob Engblom" <jakob@virtutech.com>
To: "'Vladimir Prus'" <vladimir@codesourcery.com>,
		<gdb-patches@sources.redhat.com>
Subject: RE: reverse for GDB/MI
Date: Thu, 18 Dec 2008 09:16:00 -0000	[thread overview]
Message-ID: <000a01c960f1$2c88d6c0$859a8440$@com> (raw)
In-Reply-To: <gid1vj$irm$1@ger.gmane.org>

> >> I am not quite sure about adding new set of commands for that. Can we use
> >> --reverse option, thereby not introducing new commands?

What would be the gain from NOT adding the commands, as you see it? It certainly
looks like the most straightforward and easy-to-understand solution. 

> >
> > Adding a reverse option to the existing commands is possible. But I do
> > not think it is a good idea. It is not always obvious what should
> > happen when running a standard command in reverse.
> 
> Why? -exec-step always steps forward. -exec-step --reverse always steps
> backward. Seems like a fairly simple model to me.

Overall, it is not that simple, unfortunately, and that is our experience from
doing reverse execution on a large scale for the past four years. 

First of all, the logic in the implementation side is very different for forward
and backward step.  Second, going into that logic is simpler with a separate set
of commands -- much easier both to send out and parse in the code, as the
reverse bits are obviously separated.  Having a --reverse flag will force
command handlers that only deal with the normal case to check for reverse and
either return an error or take some other action. Why complicate it like that?
If you cannot do reverse, having a set of reverse commands that is clearly
defined by looking just at the command makes ignoring them easier.   There is no
shortage of name space in MI, and thus I cannot see that there is any value to
making things more complicated with an extra flag. 

This is also inline with the gdb command line structure, and I think it eases
understanding the system as a whole if all command interfaces use a similar
semantic structure. 

Note that on a conceptual level there are new possibilities in reverse execution
that do not exist in classic unidirectional debugging. For example, "go to time
point P".  Since a classic unidirectional debugger can only stop or go forward,
this concept did not exist in such a form.  This is not part of the current
patch, but certainly can be seen to come up moving forward (or it might be
already part of bookmarking in the reverse gdb). 


Best regards,

/jakob

_______________________________________________________

Jakob Engblom, PhD, Technical Marketing Manager

Virtutech                   Direct: +46 8 690 07 47    
Drottningholmsvägen 14      Mobile: +46 709 242 646   
11243 Stockholm             Web:    www.virtutech.com  
Sweden
________________________________________________________
 




  reply	other threads:[~2008-12-18  9:16 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 10:59 Tomas Holmberg
2008-12-15 18:52 ` Marc Khouzam
2008-12-16  8:44   ` Jakob Engblom
2008-12-16 14:45     ` Marc Khouzam
2008-12-15 20:50 ` Eli Zaretskii
2008-12-17 14:57   ` Tomas Holmberg
2008-12-17 16:41     ` Eli Zaretskii
2008-12-17 16:17 ` Vladimir Prus
2008-12-18  8:33   ` Tomas Holmberg
2008-12-18  8:35     ` Vladimir Prus
2008-12-18  9:16       ` Jakob Engblom [this message]
2009-02-05  9:38         ` Vladimir Prus
2009-02-06  4:11           ` Doug Evans
2009-02-06 10:08           ` Jakob Engblom
2009-02-06 10:49             ` Vladimir Prus
2009-02-06 13:56               ` Jakob Engblom
2008-12-19  8:26       ` Tomas Holmberg
2008-12-19 11:07         ` Joel Brobecker
2008-12-19 13:22           ` Pedro Alves
2008-12-19 13:32             ` Jakob Engblom
2008-12-19 19:11         ` Michael Snyder
2008-12-22 20:27           ` Marc Khouzam
2008-12-22 21:14             ` Michael Snyder
2008-12-22 21:16               ` Marc Khouzam
2009-01-03 18:09             ` Jakob Engblom
2009-01-20 18:22               ` Marc Khouzam
2009-01-21  5:23                 ` teawater
2009-01-21 15:21                 ` Tomas Holmberg
2009-02-05 12:08                 ` Vladimir Prus
2008-12-18 21:39     ` Michael Snyder
2008-12-19  9:10       ` Tomas Holmberg

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='000a01c960f1$2c88d6c0$859a8440$@com' \
    --to=jakob@virtutech.com \
    --cc=gdb-patches@sources.redhat.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