public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: "Xing, Charlie" <Charlie.Xing@Teradata.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: Will GDB extract the entire Variable history in further releases, based on Reverse Debugging?
Date: Mon, 28 May 2012 15:28:00 -0000	[thread overview]
Message-ID: <20120528152808.GA18997@host2.jankratochvil.net> (raw)
In-Reply-To: <D466CE00251CE745AAE4B3677C6BFD520523D90F@SUSHDC8004.TD.TERADATA.COM>

On Mon, 28 May 2012 03:38:07 +0200, Xing, Charlie wrote:
> I've used the "Reverse Debugging" feature of GDB 7.4 and I'm curious if you
> guys would provide any advanced features based on it, E.g., Extracting the
> entire Variable History.

Also not sure what you mean like Pedro but I use IMO something like such
feature:

(gdb) l
1	/* 1 */ int var;
2	/* 2 */ int main (void) {
3	/* 3 */   int i; for (i=0;i<100;i++)
4	/* 4 */     var=i/10;
5	/* 5 */  return 0; }
(gdb) start
(gdb) record 
(gdb) adv 5
main () at history.c:5
5	/* 5 */  return 0; }
(gdb) watch var
Hardware watchpoint 2: var
(gdb) reverse-continue 
Continuing.
Hardware watchpoint 2: var

Old value = 9
New value = 8
0x00000000004004c3 in main () at history.c:4
4	/* 4 */     var=i/10;
(gdb) p i
$1 = 90
(gdb) reverse-continue 
Continuing.
Hardware watchpoint 2: var

Old value = 8
New value = 7
0x00000000004004c3 in main () at history.c:4
4	/* 4 */     var=i/10;
(gdb) p i
$2 = 80


Regards,
Jan

      parent reply	other threads:[~2012-05-28 15:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-28  1:38 Xing, Charlie
2012-05-28 15:14 ` Pedro Alves
2012-05-29  9:31   ` Xing, Charlie
2012-05-28 15:28 ` Jan Kratochvil [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=20120528152808.GA18997@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=Charlie.Xing@Teradata.com \
    --cc=gdb@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).