From: Pedro Alves <pedro@codesourcery.com>
To: Hui Zhu <teawater@gmail.com>
Cc: gdb@sourceware.org, Jakob Engblom <jakob@virtutech.com>
Subject: Re: gdb reverse execution: how to actually run tests for it?
Date: Thu, 20 Aug 2009 17:10:00 -0000 [thread overview]
Message-ID: <200908201602.50138.pedro@codesourcery.com> (raw)
In-Reply-To: <daef60380908170831r283ee7b3qffc7d7a040b2ba7e@mail.gmail.com>
On Monday 17 August 2009 16:31:19, Hui Zhu wrote:
> > How bad is the failure mode in the reverse tests if the target
> > does not support reverse at all? Can't we try a simple
> > probing-for-support reverse test and if that fails skip the
> > rest of the reverse tests? That would likely get rid of all
> > the current needs for a hacked board file.
> >
> > --
> > Pedro Alves
> >
>
> It will be very helpful.
>
> If the target don't support reverse, it will out like:
> (gdb) rc
> Target child does not support this command.
That's a native target ("child"). I don't think you'll get that
error currently against *remote* targets. Looking at remote.c:remote_resume,
I think a reverse-continue command against gdbserver will
end up sending a regular forward-direction "vCont" packet, so the
remote inferior will execute *forward* instead of reverse...
Oh well, it's easy to try. Here it goes:
$./gdbserver :9999 ./gdbserver
./gdb ./gdbserver/gdbserver
(gdb) tar remote :9999
(gdb) b main
(gdb) c
1884 char **next_arg = &argv[1];
(gdb) reverse-step
1885 int multi_mode = 0;
If you disable the vCont packet, with "set remote verbose-resume-packet off",
then GDB will indeed send the correct back-step or back-continue
("bs"/"bc") packets, but, those will be ignored by gdbserver... You'll end
up with a broken debug session if you try this:
1884 char **next_arg = &argv[1];
(gdb) set remote verbose-resume-packet off
(gdb) reverse-step
warning: Invalid remote reply:
<gdb hangs>
<ctrl-c>
<ctrl-c>
Interrupted while waiting for the program.
Give up (and stop debugging it)? (y or n)
...
It's really much better if the target reports
support or not upfront, so that GDB doesn't even *try* anything
reverse if the target does not support it.
--
Pedro Alves
next prev parent reply other threads:[~2009-08-20 15:03 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 7:42 Jakob Engblom
2009-08-17 7:58 ` Hui Zhu
2009-08-17 11:33 ` Jakob Engblom
2009-08-17 11:50 ` Jakob Engblom
2009-08-17 11:55 ` Pedro Alves
2009-08-17 15:31 ` Pedro Alves
2009-08-17 15:52 ` Hui Zhu
2009-08-20 17:10 ` Pedro Alves [this message]
2009-08-19 7:34 ` Jakob Engblom
2009-08-17 18:24 ` Michael Snyder
2009-08-17 20:08 ` Jakob Engblom
2009-08-17 22:44 ` Michael Snyder
2009-08-19 7:24 ` Jakob Engblom
2009-08-19 8:58 ` Simics & reverse execution Jakob Engblom
2009-08-19 12:29 ` Hui Zhu
2009-08-19 20:03 ` Jakob Engblom
2009-08-19 20:29 ` Michael Snyder
2009-08-19 20:44 ` Daniel Jacobowitz
2009-08-19 21:09 ` Pedro Alves
2009-08-20 6:54 ` Jakob Engblom
2009-08-20 15:03 ` Pedro Alves
2009-08-27 4:44 ` Michael Snyder
2009-08-27 8:17 ` Jakob Engblom
2009-08-28 11:04 ` Michael Snyder
2009-08-28 15:17 ` Greg Law
2009-08-31 13:22 ` Jakob Engblom
2009-08-31 16:34 ` Greg Law
2009-09-01 6:37 ` Jakob Engblom
2009-09-01 13:49 ` Greg Law
2009-09-03 19:16 ` Jakob Engblom
2009-09-04 12:44 ` Greg Law
2009-09-07 7:16 ` Jakob Engblom
2009-09-07 8:13 ` Greg Law
2009-09-07 8:24 ` Jakob Engblom
2009-09-07 12:06 ` Greg Law
2009-09-08 7:21 ` Jakob Engblom
2009-09-08 12:08 ` Greg Law
2009-09-08 13:02 ` Jakob Engblom
2009-09-08 19:11 ` Greg Law
2009-09-14 8:26 ` Jakob Engblom
2009-09-17 3:07 ` Michael Snyder
2009-08-19 7:24 ` gdb reverse execution: how to actually run tests for it? Jakob Engblom
2009-08-19 15:28 ` Pedro Alves
2009-08-19 16:37 ` Tom Tromey
2009-08-20 13:10 ` Jakob Engblom
2009-08-20 14:50 ` Daniel Jacobowitz
2009-08-20 20:27 ` Michael Snyder
2009-08-20 6:53 ` 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=200908201602.50138.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb@sourceware.org \
--cc=jakob@virtutech.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