From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18787 invoked by alias); 17 Dec 2008 14:57:04 -0000 Received: (qmail 18772 invoked by uid 22791); 17 Dec 2008 14:57:02 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_37 X-Spam-Check-By: sourceware.org Received: from dns.vtab.com (HELO oden.vtab.com) (62.20.90.195) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Dec 2008 14:56:27 +0000 Received: from oden.vtab.com (oden.vtab.com [127.0.0.1]) by oden.vtab.com (Postfix) with ESMTP id 6BCC126F6C2; Wed, 17 Dec 2008 15:56:22 +0100 (CET) Received: from jessica.hq.vtech (jessica.hq.vtech [10.0.0.70]) by oden.vtab.com (Postfix) with ESMTP id 5428726F6C0; Wed, 17 Dec 2008 15:56:22 +0100 (CET) Message-ID: <49491316.8080402@virtutech.com> Date: Wed, 17 Dec 2008 14:57:00 -0000 From: Tomas Holmberg User-Agent: Thunderbird 2.0.0.18 (X11/20081119) MIME-Version: 1.0 To: Eli Zaretskii CC: gdb-patches@sourceware.org, msnyder@vmware.com Subject: Re: reverse for GDB/MI References: <49463870.6080302@virtutech.com> In-Reply-To: Content-Type: multipart/mixed; boundary="------------000605000102070900010902" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00312.txt.bz2 This is a multi-part message in MIME format. --------------000605000102070900010902 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 124 > Thanks, but please also submit a suitable change for the manual. Documentation for reverse MI commands attached. /tomas --------------000605000102070900010902 Content-Type: text/plain; name="gdb.texinfo.rev_mi.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="gdb.texinfo.rev_mi.txt" Content-length: 5471 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 --------------000605000102070900010902--