From: Tomas Holmberg <th@virtutech.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org, msnyder@vmware.com
Subject: Re: reverse for GDB/MI
Date: Wed, 17 Dec 2008 14:57:00 -0000 [thread overview]
Message-ID: <49491316.8080402@virtutech.com> (raw)
In-Reply-To: <ur649i2pi.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 124 bytes --]
> Thanks, but please also submit a suitable change for the manual.
Documentation for reverse MI commands attached.
/tomas
[-- Attachment #2: gdb.texinfo.rev_mi.txt --]
[-- Type: text/plain, Size: 5471 bytes --]
Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.541
diff -u -r1.541 gdb.texinfo
--- gdb.texinfo 16 Dec 2008 06:14:00 -0000 1.541
+++ gdb.texinfo 17 Dec 2008 14:47:26 -0000
@@ -20813,6 +20813,212 @@
@end smallexample
+@subheading The @code{-exec-reverse-continue} Command
+@findex -exec-reverse-continue
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-reverse-continue
+@end smallexample
+
+Resumes the reverse execution of the inferior program until a
+breakpoint is encountered, or until the inferior exits.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{reverse-continue}.
+
+@subsubheading Example
+
+@smallexample
+(gdb)
+-exec-reverse-continue
+^running
+*running,thread-id="all"
+(gdb)
+*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",
+thread-id="1",stopped-threads="all",
+frame=@{addr="0x10000560",func="mark",args=[],file="debug_example.c",
+fullname="/home/th/debug_example.c",line="19"@}
+(gdb)
+@end smallexample
+
+
+@subheading The @code{-exec-reverse-finish} Command
+@findex -exec-reverse-finish
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-reverse-finish
+@end smallexample
+
+Resumes the reverse execution of the inferior program until the point
+where current function was called.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{reverse-finish}.
+
+@subsubheading Example
+
+@smallexample
+(gdb)
+-exec-step
+^running
+*running,thread-id="all"
+(gdb)
+*stopped,reason="end-stepping-range",thread-id="1",stopped-threads="all",
+frame=@{addr="0x10000580",func="mark",args=[],file="debug_example.c",
+fullname="/home/th/debug_example.c",line="20"@}
+(gdb)
+-exec-reverse-finish
+^running
+*running,thread-id="all"
+(gdb)
+*stopped
+*running,thread-id="all"
+*stopped,reason="end-stepping-range",thread-id="1",stopped-threads="all",
+frame=@{addr="0x1000070c",func="main",args=[],
+file="debug_example.c",fullname="/home/th/debug_example.c",line="52"@}
+(gdb)
+@end smallexample
+
+
+@subheading The @code{-exec-reverse-next} Command
+@findex -exec-reverse-next
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-reverse-next
+@end smallexample
+
+Resumes reverse execution of the inferior program, stopping at the
+beginning of the previous source line. Starting from the first line of
+a function, the command will take you back to the caller of that
+function, before the function was called.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{reverse-next}.
+
+@subsubheading Example
+
+@smallexample
+(gdb)
+-exec-reverse-next
+^running
+*running,thread-id="all"
+(gdb)
+*stopped,reason="end-stepping-range",
+thread-id="1",stopped-threads="all",
+frame=@{addr="0x100006f4",func="main",args=[],
+file="debug_example.c",fullname="/home/th/debug_example.c",line="52"@}
+(gdb)
+@end smallexample
+
+
+@subheading The @code{-exec-reverse-next-instruction} Command
+@findex -exec-reverse-next-instruction
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-reverse-next-instruction
+@end smallexample
+
+Resumes reverse execution of the inferior program, stopping at the
+previous instruction. If the previously executed instruction was a
+return from another instruction, it will continue to execute in
+reverse until the call to that function (from the current stack frame)
+is reached.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{reverse-nexti}.
+
+@subsubheading Example
+
+@smallexample
+(gdb)
+-exec-reverse-next-instruction
+^running
+*running,thread-id="all"
+(gdb)
+*stopped,reason="end-stepping-range",
+thread-id="1",stopped-threads="all",
+frame=@{addr="0x100006f4",func="main",args=[],
+file="debug_example.c",fullname="/home/th/debug_example.c",line="52"@}
+(gdb)
+@end smallexample
+
+
+@subheading The @code{-exec-reverse-step} Command
+@findex -exec-reverse-step
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-reverse-step
+@end smallexample
+
+Resumes reverse execution of the inferior program, stopping at the
+beginning of the previously executed source line.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{reverse-step}.
+
+@subsubheading Example
+
+@smallexample
+(gdb)
+-exec-reverse-step
+^running
+*running,thread-id="all"
+(gdb)
+*stopped,reason="end-stepping-range",
+thread-id="1",stopped-threads="all",
+frame=@{addr="0x100006d8",func="main",args=[],
+file="debug_example.c",fullname="/home/th/debug_example.c",line="51"@}
+(gdb)
+@end smallexample
+
+
+@subheading The @code{-exec-reverse-step-instruction} Command
+@findex -exec-reverse-step-instruction
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-reverse-step-instruction
+@end smallexample
+
+Resumes reverse execution of the inferior program, stopping at the
+previously executed instruction.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{reverse-stepi}.
+
+@subsubheading Example
+
+@smallexample
+(gdb)
+-exec-reverse-step-instruction
+^running
+*running,thread-id="all"
+(gdb)
+*stopped,reason="end-stepping-range",
+thread-id="1",stopped-threads="all",
+frame=@{addr="0x100006d8",func="main",args=[],
+file="debug_example.c",fullname="/home/th/debug_example.c",line="51"@}
+(gdb)
+@end smallexample
+
+
@subheading The @code{-exec-run} Command
@findex -exec-run
next prev parent reply other threads:[~2008-12-17 14:57 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 [this message]
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
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=49491316.8080402@virtutech.com \
--to=th@virtutech.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.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