GDB MI Reverse Commands added [2 of 3]

Jakob Engblom
2009-08-26T14:38:17Z

Here are the documentation updates.

Changelog: "Added documentation of gdb-MI reverse debugging commands"

cvs diff: Diffing gdb/doc
Index: gdb/doc/gdb.texinfo
===================================================================
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 25 Aug 2009 14:40:16 -0000
*************** other cases.
*** 22394,22413 ****
@subsubheading Synopsis

@smallexample
!  -exec-continue [--all|--thread-group N]
@end smallexample

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.

@subsubheading @value{GDBN} Command

--- 22394,22415 ----
@subsubheading Synopsis

@smallexample
!  -exec-continue [--reverse] [--all|--thread-group N]
@end smallexample

Resumes the execution of the inferior program until a breakpoint is
! encountered, or until the inferior exits. If the @samp{--reverse}
! option is specified, resumes the reverse 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.

@subsubheading @value{GDBN} Command

*************** line="13"@}
*** 22433,22443 ****
@subsubheading Synopsis

@smallexample
!  -exec-finish
@end smallexample

Resumes the execution of the inferior program until the current
function is exited.  Displays the results returned by the function.

@subsubheading @value{GDBN} Command

--- 22435,22448 ----
@subsubheading Synopsis

@smallexample
!  -exec-finish [--reverse]
@end smallexample

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.

@subsubheading @value{GDBN} Command

*************** The corresponding @value{GDBN} command i
*** 22556,22567 ****
@subsubheading Synopsis

@smallexample
!  -exec-next
@end smallexample

Resumes execution of the inferior program, stopping when the beginning
of the next source line is reached.

@subsubheading @value{GDBN} Command

The corresponding @value{GDBN} command is @samp{next}.
--- 22561,22578 ----
@subsubheading Synopsis

@smallexample
!  -exec-next [--reverse]
@end smallexample

Resumes execution of the inferior program, stopping when the beginning
of the next source line is reached.

+ If the @samp{--reverse} option is specified, 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{next}.
*************** The corresponding @value{GDBN} command i
*** 22583,22589 ****
@subsubheading Synopsis

@smallexample
!  -exec-next-instruction
@end smallexample

Executes one machine instruction.  If the instruction is a function
--- 22594,22600 ----
@subsubheading Synopsis

@smallexample
!  -exec-next-instruction [--reverse]
@end smallexample

Executes one machine instruction.  If the instruction is a function
*************** call, continues until the function retur
*** 22591,22596 ****
--- 22602,22613 ----
instruction in the middle of a source line, the address will be
printed as well.

+ 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 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{nexti}.
*************** signal-meaning="Interrupt"
*** 22733,22745 ****
@subsubheading Synopsis

@smallexample
!  -exec-step
@end smallexample

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.

@subsubheading @value{GDBN} Command

--- 22750,22764 ----
@subsubheading Synopsis

@smallexample
!  -exec-step [--reverse]
@end smallexample

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.

@subsubheading @value{GDBN} Command

*************** Regular stepping:
*** 22777,22786 ****
@subsubheading Synopsis

@smallexample
!  -exec-step-instruction
@end smallexample

! 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
--- 22796,22807 ----
@subsubheading Synopsis

@smallexample
!  -exec-step-instruction [--reverse]
@end smallexample

! 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

Best regards,

/jakob

_______________________________________________________

Jakob Engblom, PhD, Technical Marketing Manager

Virtutech                   Direct: +46 8 690 07 47
Drottningholmsvägen 22      Mobile: +46 709 242 646
11243 Stockholm             Web:    www.virtutech.com
Sweden
________________________________________________________