From: David McQuillan <dmcq@fano.co.uk>
To: paawan oza <paawan1982@yahoo.com>
Cc: gdb@sourceware.org
Subject: Re: reverse debugging implementation + commands
Date: Wed, 25 Aug 2010 20:43:00 -0000 [thread overview]
Message-ID: <4C758049.9080008@fano.co.uk> (raw)
In-Reply-To: <312153.55254.qm@web112503.mail.gq1.yahoo.com>
Just a bit on testing for conditions when going backwards.
Just had a look at reverse.c and it is very different from anything I
ever did. To find the last time a location was changed for instance it
looks like it would go back one instruction at a time until the
condition is satisfied. I can see a middle way that encompasses both
approaches in that if the registers are saved on every single
instruction my approach ends up being the same as what reverse.c does so
I've written it up here that way:
set found counter to unset
set check counter to here
while found counter is null and we can go backwards
roll back from check counter to previous save point
go forward till check counter reached
if condition set then
set found counter to instruction counter
endif
if found counter not set
roll back to last save point
set check counter to this point
endif
endwhile
At the end of this found counter if set gives the instruction counter
when the condition was last satisfied.
With this there is no special work needed to check conditions when going
backwards compared to going forwards.
David
prev parent reply other threads:[~2010-08-25 20:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-22 13:39 reverse debugging implementation David McQuillan
2010-08-25 6:30 ` paawan oza
2010-08-25 18:55 ` David McQuillan
2010-09-02 6:48 ` Engblom, Jakob
2010-09-02 9:44 ` paawan oza
2010-09-02 12:52 ` Engblom, Jakob
2010-08-25 20:43 ` David McQuillan [this message]
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=4C758049.9080008@fano.co.uk \
--to=dmcq@fano.co.uk \
--cc=gdb@sourceware.org \
--cc=paawan1982@yahoo.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