From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26386 invoked by alias); 31 Aug 2009 12:14:33 -0000 Received: (qmail 26375 invoked by uid 22791); 31 Aug 2009 12:14:31 -0000 X-SWARE-Spam-Status: No, hits=-0.9 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_37,MIME_QP_LONG_LINE X-Spam-Check-By: sourceware.org Received: from vtab.com (HELO oden.vtab.com) (62.20.90.195) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 31 Aug 2009 12:14:25 +0000 Received: from oden.vtab.com (oden.vtab.com [127.0.0.1]) by oden.vtab.com (Postfix) with ESMTP id 0E67726EF8A for ; Mon, 31 Aug 2009 14:14:22 +0200 (CEST) Received: from polhem (unknown [62.20.90.206]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by oden.vtab.com (Postfix) with ESMTP id 8366326EF89 for ; Mon, 31 Aug 2009 14:14:21 +0200 (CEST) From: "Jakob Engblom" To: References: <00cf01ca265a$d4110dc0$7c332940$@com> <83tyzucw8p.fsf@gnu.org> <002b01ca27c7$1316d8c0$39448a40$@com> <833a7ccj52.fsf@gnu.org> <4A97BA98.4010105@undo-software.com> <83y6p4aweu.fsf@gnu.org> <4A980D06.40002@undo-software.com> <83ljl3c16f.fsf@gnu.org> <4A981551.4060504@vmware.com> <83k50nbrja.fsf@gnu.org> <4A9865A5.1020703@vmware.com> <00d201ca2a33$454aa920$cfdffb60$@com> In-Reply-To: <00d201ca2a33$454aa920$cfdffb60$@com> Subject: RE: GDB MI Reverse Commands added [2 of 3] Date: Mon, 31 Aug 2009 13:06:00 -0000 Message-ID: <00d501ca2a34$93e5fe30$bbb1fa90$@com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_00D6_01CA2A45.576ECE30" X-IsSubscribed: yes 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: 2009-08/txt/msg00579.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_00D6_01CA2A45.576ECE30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 9257 Here is an updated patch. As well as a better changelog entry. Diff also attached as a file, for easier processing if someone wants it that way. Changelog:=20 doc/ * gdb.texinfo (MI commands): Added documentation of --reverse option to a s= et of MI commands. Restructured documentation of MI commands --exec-continue to reflect the complexity of reverse execution. (jakob@virtutech.com) Index: gdb/doc/gdb.texinfo =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.615 diff -c -p -r1.615 gdb.texinfo *** gdb/doc/gdb.texinfo 6 Aug 2009 23:08:16 -0000 1.615 --- gdb/doc/gdb.texinfo 31 Aug 2009 12:09:08 -0000 *************** line of a function back to its return to *** 5027,5033 **** Like @code{nexti}, @code{reverse-nexti} executes a single instruction in reverse, except that called functions are ``un-executed'' atomically. That is, if the previously executed instruction was a return from ! another instruction, @code{reverse-nexti} will continue to execute in reverse until the call to that function (from the current stack frame) is reached. =20=20 --- 5027,5033 ---- Like @code{nexti}, @code{reverse-nexti} executes a single instruction in reverse, except that called functions are ``un-executed'' atomically. That is, if the previously executed instruction was a return from ! another function, @code{reverse-nexti} will continue to execute in reverse until the call to that function (from the current stack frame) is reached. =20=20 *************** other cases. *** 22394,22413 **** @subsubheading Synopsis =20=20 @smallexample ! -exec-continue [--all|--thread-group N] @end smallexample =20=20 ! Resumes the execution of the inferior program until a breakpoint is ! encountered, or until the inferior exits. In all-stop mode ! (@pxref{All-Stop Mode}), may resume only one thread, or all threads, ! depending on the value of the @samp{scheduler-locking} variable. In ! non-stop mode (@pxref{Non-Stop Mode}), if the @samp{--all} is not ! specified, only the thread specified with the @samp{--thread} option ! (or current thread, if no @samp{--thread} is provided) is resumed. If ! @samp{--all} is specified, all threads will be resumed. The ! @samp{--all} option is ignored in all-stop mode. If the ! @samp{--thread-group} options is specified, then all threads in that ! thread group are resumed. =20=20 @subsubheading @value{GDBN} Command =20=20 --- 22394,22422 ---- @subsubheading Synopsis =20=20 @smallexample ! -exec-continue [--reverse] [--all|--thread-group N] @end smallexample =20=20 ! Resumes the execution of the inferior program, which will continue ! to execute until it reaches a debugger stop event. If the=20 ! @samp{--reverse} option is specified, execution resumes in reverse until= =20 ! it reaches a stop event. Stop events may include ! @itemize @bullet ! @item ! breakpoints or watchpoints ! @item ! signals or exceptions ! @item ! the end of the process (or its beginning under @samp{--reverse}) ! @item ! the end or beginning of a replay log if one is being used. ! @end itemize ! In all-stop mode (@pxref{All-Stop ! Mode}), may resume only one thread, or all threads, depending on the ! value of the @samp{scheduler-locking} variable. If @samp{--all} is ! specified, all threads will be resumed. The @samp{--all} option is ! ignored in all-stop mode. If the @samp{--thread-group} options is ! specified, then all threads in that thread group are resumed. =20=20 @subsubheading @value{GDBN} Command =20=20 *************** line=3D"13"@} *** 22433,22443 **** @subsubheading Synopsis =20=20 @smallexample ! -exec-finish @end smallexample =20=20 Resumes the execution of the inferior program until the current function is exited. Displays the results returned by the function. =20=20 @subsubheading @value{GDBN} Command =20=20 --- 22442,22455 ---- @subsubheading Synopsis =20=20 @smallexample ! -exec-finish [--reverse] @end smallexample =20=20 Resumes the execution of the inferior program until the current function is exited. Displays the results returned by the function. + If the @samp{--reverse} option is specified, resumes the reverse + execution of the inferior program until the point where current + function was called. =20=20 @subsubheading @value{GDBN} Command =20=20 *************** The corresponding @value{GDBN} command i *** 22556,22567 **** @subsubheading Synopsis =20=20 @smallexample ! -exec-next @end smallexample =20=20 Resumes execution of the inferior program, stopping when the beginning of the next source line is reached. =20=20 @subsubheading @value{GDBN} Command =20=20 The corresponding @value{GDBN} command is @samp{next}. --- 22568,22586 ---- @subsubheading Synopsis =20=20 @smallexample ! -exec-next [--reverse] @end smallexample =20=20 Resumes execution of the inferior program, stopping when the beginning of the next source line is reached. =20=20 + If the @samp{--reverse} option is specified, resumes reverse execution + of the inferior program, stopping at the beginning of the previous + source line. If you issue this command on the first line of a + function, it will take you back to the caller of that function, to the + source line where the function was called. +=20 +=20 @subsubheading @value{GDBN} Command =20=20 The corresponding @value{GDBN} command is @samp{next}. *************** The corresponding @value{GDBN} command i *** 22583,22589 **** @subsubheading Synopsis =20=20 @smallexample ! -exec-next-instruction @end smallexample =20=20 Executes one machine instruction. If the instruction is a function --- 22602,22608 ---- @subsubheading Synopsis =20=20 @smallexample ! -exec-next-instruction [--reverse] @end smallexample =20=20 Executes one machine instruction. If the instruction is a function *************** call, continues until the function retur *** 22591,22596 **** --- 22610,22621 ---- instruction in the middle of a source line, the address will be printed as well. =20=20 + If the @samp{--reverse} option is specified, resumes reverse execution + of the inferior program, stopping at the previous instruction. If the + previously executed instruction was a return from another function, + it will continue to execute in reverse until the call to that function + (from the current stack frame) is reached. +=20 @subsubheading @value{GDBN} Command =20=20 The corresponding @value{GDBN} command is @samp{nexti}. *************** signal-meaning=3D"Interrupt" *** 22733,22745 **** @subsubheading Synopsis =20=20 @smallexample ! -exec-step @end smallexample =20=20 Resumes execution of the inferior program, stopping when the beginning of the next source line is reached, if the next source line is not a function call. If it is, stop at the first instruction of the called ! function. =20=20 @subsubheading @value{GDBN} Command =20=20 --- 22758,22772 ---- @subsubheading Synopsis =20=20 @smallexample ! -exec-step [--reverse] @end smallexample =20=20 Resumes execution of the inferior program, stopping when the beginning of the next source line is reached, if the next source line is not a function call. If it is, stop at the first instruction of the called ! function. If the @samp{--reverse} option is specified, resumes reverse ! execution of the inferior program, stopping at the beginning of the ! previously executed source line. =20=20 @subsubheading @value{GDBN} Command =20=20 *************** Regular stepping: *** 22777,22790 **** @subsubheading Synopsis =20=20 @smallexample ! -exec-step-instruction @end smallexample =20=20 ! Resumes the inferior which executes one machine instruction. The ! output, once @value{GDBN} has stopped, will vary depending on whether ! we have stopped in the middle of a source line or not. In the former ! case, the address at which the program stopped will be printed as ! well. =20=20 @subsubheading @value{GDBN} Command =20=20 --- 22804,22819 ---- @subsubheading Synopsis =20=20 @smallexample ! -exec-step-instruction [--reverse] @end smallexample =20=20 ! Resumes the inferior which executes one machine instruction. If the ! @samp{--reverse} option is specified, resumes reverse execution of the ! inferior program, stopping at the previously executed instruction. ! The output, once @value{GDBN} has stopped, will vary depending on ! whether we have stopped in the middle of a source line or not. In the ! former case, the address at which the program stopped will be printed ! as well. =20=20 @subsubheading @value{GDBN} Command =20=20 Best regards, /jakob _______________________________________________________ Jakob Engblom, PhD, Technical Marketing Manager Virtutech=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Direct: +46= 8 690 07 47=A0=A0=A0 Drottningholmsv=E4gen 22=A0=A0=A0=A0=A0 Mobile: +46 709 242 646=A0=A0 11243 Stockholm=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Web:=A0=A0=A0 www.virtu= tech.com=A0 Sweden ________________________________________________________ =A0=20 ------=_NextPart_000_00D6_01CA2A45.576ECE30 Content-Type: application/octet-stream; name="gdb.texinfo.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="gdb.texinfo.diff" Content-length: 9343 Index: gdb/doc/gdb.texinfo=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v=0A= retrieving revision 1.615=0A= diff -c -p -r1.615 gdb.texinfo=0A= *** gdb/doc/gdb.texinfo 6 Aug 2009 23:08:16 -0000 1.615=0A= --- gdb/doc/gdb.texinfo 31 Aug 2009 12:09:08 -0000=0A= *************** line of a function back to its return to=0A= *** 5027,5033 ****=0A= Like @code{nexti}, @code{reverse-nexti} executes a single instruction=0A= in reverse, except that called functions are ``un-executed'' atomically.= =0A= That is, if the previously executed instruction was a return from=0A= ! another instruction, @code{reverse-nexti} will continue to execute=0A= in reverse until the call to that function (from the current stack=0A= frame) is reached.=0A= =20=20=0A= --- 5027,5033 ----=0A= Like @code{nexti}, @code{reverse-nexti} executes a single instruction=0A= in reverse, except that called functions are ``un-executed'' atomically.= =0A= That is, if the previously executed instruction was a return from=0A= ! another function, @code{reverse-nexti} will continue to execute=0A= in reverse until the call to that function (from the current stack=0A= frame) is reached.=0A= =20=20=0A= *************** other cases.=0A= *** 22394,22413 ****=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-continue [--all|--thread-group N]=0A= @end smallexample=0A= =20=20=0A= ! Resumes the execution of the inferior program until a breakpoint is=0A= ! encountered, or until the inferior exits. In all-stop mode=0A= ! (@pxref{All-Stop Mode}), may resume only one thread, or all threads,=0A= ! depending on the value of the @samp{scheduler-locking} variable. In=0A= ! non-stop mode (@pxref{Non-Stop Mode}), if the @samp{--all} is not=0A= ! specified, only the thread specified with the @samp{--thread} option=0A= ! (or current thread, if no @samp{--thread} is provided) is resumed. If=0A= ! @samp{--all} is specified, all threads will be resumed. The=0A= ! @samp{--all} option is ignored in all-stop mode. If the=0A= ! @samp{--thread-group} options is specified, then all threads in that=0A= ! thread group are resumed.=0A= =20=20=0A= @subsubheading @value{GDBN} Command=0A= =20=20=0A= --- 22394,22422 ----=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-continue [--reverse] [--all|--thread-group N]=0A= @end smallexample=0A= =20=20=0A= ! Resumes the execution of the inferior program, which will continue=0A= ! to execute until it reaches a debugger stop event. If the=20=0A= ! @samp{--reverse} option is specified, execution resumes in reverse until= =20=0A= ! it reaches a stop event. Stop events may include=0A= ! @itemize @bullet=0A= ! @item=0A= ! breakpoints or watchpoints=0A= ! @item=0A= ! signals or exceptions=0A= ! @item=0A= ! the end of the process (or its beginning under @samp{--reverse})=0A= ! @item=0A= ! the end or beginning of a replay log if one is being used.=0A= ! @end itemize=0A= ! In all-stop mode (@pxref{All-Stop=0A= ! Mode}), may resume only one thread, or all threads, depending on the=0A= ! value of the @samp{scheduler-locking} variable. If @samp{--all} is=0A= ! specified, all threads will be resumed. The @samp{--all} option is=0A= ! ignored in all-stop mode. If the @samp{--thread-group} options is=0A= ! specified, then all threads in that thread group are resumed.=0A= =20=20=0A= @subsubheading @value{GDBN} Command=0A= =20=20=0A= *************** line=3D"13"@}=0A= *** 22433,22443 ****=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-finish=0A= @end smallexample=0A= =20=20=0A= Resumes the execution of the inferior program until the current=0A= function is exited. Displays the results returned by the function.=0A= =20=20=0A= @subsubheading @value{GDBN} Command=0A= =20=20=0A= --- 22442,22455 ----=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-finish [--reverse]=0A= @end smallexample=0A= =20=20=0A= Resumes the execution of the inferior program until the current=0A= function is exited. Displays the results returned by the function.=0A= + If the @samp{--reverse} option is specified, resumes the reverse=0A= + execution of the inferior program until the point where current=0A= + function was called.=0A= =20=20=0A= @subsubheading @value{GDBN} Command=0A= =20=20=0A= *************** The corresponding @value{GDBN} command i=0A= *** 22556,22567 ****=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-next=0A= @end smallexample=0A= =20=20=0A= Resumes execution of the inferior program, stopping when the beginning=0A= of the next source line is reached.=0A= =20=20=0A= @subsubheading @value{GDBN} Command=0A= =20=20=0A= The corresponding @value{GDBN} command is @samp{next}.=0A= --- 22568,22586 ----=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-next [--reverse]=0A= @end smallexample=0A= =20=20=0A= Resumes execution of the inferior program, stopping when the beginning=0A= of the next source line is reached.=0A= =20=20=0A= + If the @samp{--reverse} option is specified, resumes reverse execution=0A= + of the inferior program, stopping at the beginning of the previous=0A= + source line. If you issue this command on the first line of a=0A= + function, it will take you back to the caller of that function, to the=0A= + source line where the function was called.=0A= +=20=0A= +=20=0A= @subsubheading @value{GDBN} Command=0A= =20=20=0A= The corresponding @value{GDBN} command is @samp{next}.=0A= *************** The corresponding @value{GDBN} command i=0A= *** 22583,22589 ****=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-next-instruction=0A= @end smallexample=0A= =20=20=0A= Executes one machine instruction. If the instruction is a function=0A= --- 22602,22608 ----=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-next-instruction [--reverse]=0A= @end smallexample=0A= =20=20=0A= Executes one machine instruction. If the instruction is a function=0A= *************** call, continues until the function retur=0A= *** 22591,22596 ****=0A= --- 22610,22621 ----=0A= instruction in the middle of a source line, the address will be=0A= printed as well.=0A= =20=20=0A= + If the @samp{--reverse} option is specified, resumes reverse execution=0A= + of the inferior program, stopping at the previous instruction. If the=0A= + previously executed instruction was a return from another function,=0A= + it will continue to execute in reverse until the call to that function=0A= + (from the current stack frame) is reached.=0A= +=20=0A= @subsubheading @value{GDBN} Command=0A= =20=20=0A= The corresponding @value{GDBN} command is @samp{nexti}.=0A= *************** signal-meaning=3D"Interrupt"=0A= *** 22733,22745 ****=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-step=0A= @end smallexample=0A= =20=20=0A= Resumes execution of the inferior program, stopping when the beginning=0A= of the next source line is reached, if the next source line is not a=0A= function call. If it is, stop at the first instruction of the called=0A= ! function.=0A= =20=20=0A= @subsubheading @value{GDBN} Command=0A= =20=20=0A= --- 22758,22772 ----=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-step [--reverse]=0A= @end smallexample=0A= =20=20=0A= Resumes execution of the inferior program, stopping when the beginning=0A= of the next source line is reached, if the next source line is not a=0A= function call. If it is, stop at the first instruction of the called=0A= ! function. If the @samp{--reverse} option is specified, resumes reverse= =0A= ! execution of the inferior program, stopping at the beginning of the=0A= ! previously executed source line.=0A= =20=20=0A= @subsubheading @value{GDBN} Command=0A= =20=20=0A= *************** Regular stepping:=0A= *** 22777,22790 ****=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-step-instruction=0A= @end smallexample=0A= =20=20=0A= ! Resumes the inferior which executes one machine instruction. The=0A= ! output, once @value{GDBN} has stopped, will vary depending on whether=0A= ! we have stopped in the middle of a source line or not. In the former=0A= ! case, the address at which the program stopped will be printed as=0A= ! well.=0A= =20=20=0A= @subsubheading @value{GDBN} Command=0A= =20=20=0A= --- 22804,22819 ----=0A= @subsubheading Synopsis=0A= =20=20=0A= @smallexample=0A= ! -exec-step-instruction [--reverse]=0A= @end smallexample=0A= =20=20=0A= ! Resumes the inferior which executes one machine instruction. If the=0A= ! @samp{--reverse} option is specified, resumes reverse execution of the=0A= ! inferior program, stopping at the previously executed instruction.=0A= ! The output, once @value{GDBN} has stopped, will vary depending on=0A= ! whether we have stopped in the middle of a source line or not. In the=0A= ! former case, the address at which the program stopped will be printed=0A= ! as well.=0A= =20=20=0A= @subsubheading @value{GDBN} Command=0A= =20=20=0A= ------=_NextPart_000_00D6_01CA2A45.576ECE30--