From: "Jakob Engblom" <jakob@virtutech.com>
To: "'Vladimir Prus'" <vladimir@codesourcery.com>,
"Tomas Holmberg" <th@virtutech.com>
Cc: <gdb-patches@sources.redhat.com>
Subject: RE: reverse for GDB/MI
Date: Fri, 06 Feb 2009 10:08:00 -0000 [thread overview]
Message-ID: <021001c98842$c0dd56c0$42980440$@com> (raw)
In-Reply-To: <200902051239.27523.vladimir@codesourcery.com>
> 1. Use --reverse option
It looks like we are back to the --reverse discussion that we had before
Christmas. Most people seem to think that having specialized commands for
reverse execution makes more sense than having a special flag to certain
commands.
For example, Michael Snyder wrote on 2008-12-18:
http://sourceware.org/ml/gdb-patches/2008-12/msg00351.html :
----
> There are other reverse commands than the -exec-reverse-step that are more
> complicated. If you consider all reverse commands to be simple variants
> of the forward commands, then you are correct that there should just
> be a --reverse option. But I consider them to not be simple variants.
They're not simple variants. Some of them have to deal with
issues like prologues vs. epilogues, stepping thru a return
back to the callee, etc.
It's mostly handled in infrun and infcmd, by checking the
"exec-direction" flag.
> You can also look at the documentation to see if the reverse commands are
> just variants of the forward variants. I do not think we can replace the
> documentation for reverse-step, reverse-step-instruction, reverse-continue,
> reverse-finish, reverse-next, and reverse-next-instruction and just say it
> is the reverse variant for the corresponding forward commands. Please look
> at the other reverse commands and see if you can say "reverse-finish" is
> just the reverse variant of finish.
Yeah -- it's not. ;-)
It's an analogue, that's all.
----
And Tomas Holmberg: http://sourceware.org/ml/gdb-patches/2008-12/msg00319.html :
----
I am not quite sure about adding new set of commands for that. Can we use
--reverse option, thereby not introducing new commands?
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. I consider the
reverse commands as a new set commands and not a variant of the old.
----
Also, changing to variants would require rewriting code that we already have in
place and hvae tested (at least to some extent), and doing that always strikes
me as inviting problems and extra work.
About the proliferation of commands, that seems to be in the nature of things
for reverse. The commands discussed here:
> continue
> reverse-continue
> timed-continue
> reverse-timed-continue
That is how we actually do things in Simics, and it turns out to be pretty
useful. In our CLI, we have:
For basic control:
* continue [n]
* reverse [n]
* run-seconds (value)
* reverse-to (value)
* skip-to (point in time)
* stepi [n]
* reverse-stepi [n]
And with debug info loaded:
* reverse-next-instruction
* reverse-step-line
* reverse-next-line
* uncall-function
> 3. Include documentation
Documentation for the reverse commands was submitted back in December too, as
far as I can tell (http://sourceware.org/ml/gdb-patches/2008-12/msg00312.html).
Did that miss being included into the source code?
> 2. Arrange for --exec-step, and similar, to ignore 'set exec-direction',
> since all new MI commands should strive to be stateless. This, of
course,
> will mean that one cannot get existing frontend to do reverse step by
> typing a command into CLI console, but it is not obvious if existing
> frontend will work without modification anyway.
That makes sense to me too, the exec-direction concept is a bit strange.
Best regards,
/jakob
_______________________________________________________
Jakob Engblom, PhD, Technical Marketing Manager
Virtutech Direct: +46 8 690 07 47
Drottningholmsvägen 22 Mobile: +46 709 242 646
11243 Stockholm Web: www.virtutech.com
Sweden
________________________________________________________
next prev parent reply other threads:[~2009-02-06 10:08 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
2009-02-05 9:38 ` Vladimir Prus
2009-02-06 4:11 ` Doug Evans
2009-02-06 10:08 ` Jakob Engblom [this message]
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='021001c98842$c0dd56c0$42980440$@com' \
--to=jakob@virtutech.com \
--cc=gdb-patches@sources.redhat.com \
--cc=th@virtutech.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