* GDB MI Reverse Commands added [2 of 3]
@ 2009-08-26 14:38 Jakob Engblom
2009-08-26 17:38 ` Eli Zaretskii
0 siblings, 1 reply; 33+ messages in thread
From: Jakob Engblom @ 2009-08-26 14:38 UTC (permalink / raw)
To: gdb-patches
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
________________________________________________________
^ permalink raw reply [flat|nested] 33+ messages in thread* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-26 14:38 GDB MI Reverse Commands added [2 of 3] Jakob Engblom @ 2009-08-26 17:38 ` Eli Zaretskii 2009-08-27 13:48 ` Jakob Engblom ` (2 more replies) 0 siblings, 3 replies; 33+ messages in thread From: Eli Zaretskii @ 2009-08-26 17:38 UTC (permalink / raw) To: Jakob Engblom; +Cc: gdb-patches > From: "Jakob Engblom" <jakob@virtutech.com> > Date: Wed, 26 Aug 2009 16:38:07 +0200 > > Here are the documentation updates. Thanks. I have a few comments: > Changelog: "Added documentation of gdb-MI reverse debugging commands" Please format the log entries according to examples you see in gdb/doc/ChangeLog. >  Resumes the execution of the inferior program until a breakpoint is > ! encountered, or until the inferior exits. If the @samp{--reverse} ^^ Two spaces between sentences, please (here and elsewhere). > ! option is specified, resumes the reverse execution of the inferior > ! program until a breakpoint is encountered, or until the inferior > ! exits. How can you exit in reverse? I think you can only get to the beginning of `main', no? > ! 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 What `--thread' option are you talking about here? There was no such option in the "Synopsis" part above. > + 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. I needed to read the last sentence several times before its meaning hit me. Suggest to rephrase thusly: 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. > + 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, ^^^^^^^^^^^^^^^^^^^ "another instruction" or "another function"? > + it will continue to execute in reverse until the call to that function > + (from the current stack frame) is reached. ^ permalink raw reply [flat|nested] 33+ messages in thread
* RE: GDB MI Reverse Commands added [2 of 3] 2009-08-26 17:38 ` Eli Zaretskii @ 2009-08-27 13:48 ` Jakob Engblom 2009-08-28 10:05 ` Eli Zaretskii 2009-08-28 10:08 ` Jakob Engblom 2009-08-28 10:44 ` Jakob Engblom 2 siblings, 1 reply; 33+ messages in thread From: Jakob Engblom @ 2009-08-27 13:48 UTC (permalink / raw) To: gdb-patches > > Resumes the execution of the inferior program until a breakpoint is > > ! encountered, or until the inferior exits. If the @samp{--reverse} > ^^ > Two spaces between sentences, please (here and elsewhere). Will do. > > ! option is specified, resumes the reverse execution of the inferior > > ! program until a breakpoint is encountered, or until the inferior > > ! exits. > > How can you exit in reverse? I think you can only get to the > beginning of `main', no? It really depends on how your backend works... there is no necessary relationship between some function called "main" and where revexec starts. First of all, in a full-system reverse debug case, it is quite reasonable to "exit backwards" and get to the point BEFORE the program started. Just like you can get to AFTER exit if you let the program run its course. It gets even funkier if you let the backend be OS aware. In this case, the target program is only being debugged when actually execution on some targetsystem processor. At other times, there is no execution activity, as the program is not running. Here also, you can easily see how a mistaken reverse just goes back to before the program even existed, essentially a limbo analogous to after exit. There is also normally a point in time where reverse starts being available. That could be when the user turns it on DURING the execution of program, or the first instruction of a booting machine, or some other event horizon before which we have no information. On a hardware trace box, it just the start of the sliding window of visibility. So I think this makes sense, no? 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 ________________________________________________________ ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-27 13:48 ` Jakob Engblom @ 2009-08-28 10:05 ` Eli Zaretskii 0 siblings, 0 replies; 33+ messages in thread From: Eli Zaretskii @ 2009-08-28 10:05 UTC (permalink / raw) To: Jakob Engblom; +Cc: gdb-patches > From: "Jakob Engblom" <jakob@virtutech.com> > Date: Thu, 27 Aug 2009 10:26:46 +0200 > > > How can you exit in reverse? I think you can only get to the > > beginning of `main', no? > > It really depends on how your backend works... there is no necessary > relationship between some function called "main" and where revexec starts. > First of all, in a full-system reverse debug case, it is quite reasonable to > "exit backwards" and get to the point BEFORE the program started. Just like you > can get to AFTER exit if you let the program run its course. Yes, I understand that, but talking about this as "exiting" is awfully confusing, because "exiting" is generally understood as going via a call to `exit' or something similar. So I think we need to change the wording here to not just say "exit". Especially since you used "until the inferior exits" in both forward and reverse execution cases. The text should make it clear that these two "exits" are actually very different. ^ permalink raw reply [flat|nested] 33+ messages in thread
* RE: GDB MI Reverse Commands added [2 of 3] 2009-08-26 17:38 ` Eli Zaretskii 2009-08-27 13:48 ` Jakob Engblom @ 2009-08-28 10:08 ` Jakob Engblom 2009-08-28 10:49 ` Eli Zaretskii 2009-08-28 10:44 ` Jakob Engblom 2 siblings, 1 reply; 33+ messages in thread From: Jakob Engblom @ 2009-08-28 10:08 UTC (permalink / raw) To: 'Eli Zaretskii'; +Cc: gdb-patches > > ! option is specified, resumes the reverse execution of the inferior > > ! program until a breakpoint is encountered, or until the inferior > > ! exits. > > How can you exit in reverse? I think you can only get to the > beginning of `main', no? What about this? "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 execution reaches that start of the inferior. " Here, I generalize the "inferior" so that if debugging on naked hardware, exit really means the target rebooting or something like that. > > ! 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 > > What `--thread' option are you talking about here? There was no such > option in the "Synopsis" part above. And I cannot see that the code parses it either... so it will be fixed. I apologize, but I am put as the messenger for a team effort... /jakob ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-28 10:08 ` Jakob Engblom @ 2009-08-28 10:49 ` Eli Zaretskii 2009-08-28 13:41 ` Greg Law 0 siblings, 1 reply; 33+ messages in thread From: Eli Zaretskii @ 2009-08-28 10:49 UTC (permalink / raw) To: Jakob Engblom; +Cc: gdb-patches > From: "Jakob Engblom" <jakob@virtutech.com> > Cc: <gdb-patches@sourceware.org> > Date: Fri, 28 Aug 2009 12:05:29 +0200 > > "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 execution > reaches that start of the inferior. " ^^^^ You meant "the", I presume. Otherwise, this is fine, thanks. > > > ! 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 > > > > What `--thread' option are you talking about here? There was no such > > option in the "Synopsis" part above. > > And I cannot see that the code parses it either... so it will be fixed. I > apologize, but I am put as the messenger for a team effort... Thank you. ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-28 10:49 ` Eli Zaretskii @ 2009-08-28 13:41 ` Greg Law 2009-08-28 14:28 ` Eli Zaretskii 0 siblings, 1 reply; 33+ messages in thread From: Greg Law @ 2009-08-28 13:41 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Jakob Engblom, gdb-patches Eli Zaretskii wrote: >> From: "Jakob Engblom" <jakob@virtutech.com> >> Cc: <gdb-patches@sourceware.org> >> Date: Fri, 28 Aug 2009 12:05:29 +0200 >> >> "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 execution >> reaches that start of the inferior. " > ^^^^ > You meant "the", I presume. > > Otherwise, this is fine, thanks. Would it be more accurate to say "start of the record log"? Greg -- Greg Law, Undo Software http://undo-software.com/ ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-28 13:41 ` Greg Law @ 2009-08-28 14:28 ` Eli Zaretskii 2009-08-28 17:12 ` Greg Law 0 siblings, 1 reply; 33+ messages in thread From: Eli Zaretskii @ 2009-08-28 14:28 UTC (permalink / raw) To: Greg Law; +Cc: jakob, gdb-patches > Date: Fri, 28 Aug 2009 12:08:08 +0100 > From: Greg Law <glaw@undo-software.com> > CC: Jakob Engblom <jakob@virtutech.com>, gdb-patches@sourceware.org > > Eli Zaretskii wrote: > >> From: "Jakob Engblom" <jakob@virtutech.com> > >> Cc: <gdb-patches@sourceware.org> > >> Date: Fri, 28 Aug 2009 12:05:29 +0200 > >> > >> "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 execution > >> reaches that start of the inferior. " > > ^^^^ > > You meant "the", I presume. > > > > Otherwise, this is fine, thanks. > > Would it be more accurate to say "start of the record log"? I don't think so, because reverse debugging is not limited to record and replay. But I see what you mean. Maybe this: or until the execution reaches the point that is as close to the inferior's start as @value{GDBN} can. (This could be the start of the inferior executable code or the start of the record log, for example.) ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-28 14:28 ` Eli Zaretskii @ 2009-08-28 17:12 ` Greg Law 2009-08-28 17:34 ` Eli Zaretskii 2009-08-29 7:37 ` Jakob Engblom 0 siblings, 2 replies; 33+ messages in thread From: Greg Law @ 2009-08-28 17:12 UTC (permalink / raw) To: Eli Zaretskii; +Cc: jakob, gdb-patches Eli Zaretskii wrote: >> Date: Fri, 28 Aug 2009 12:08:08 +0100 >> From: Greg Law <glaw@undo-software.com> >> CC: Jakob Engblom <jakob@virtutech.com>, gdb-patches@sourceware.org >> >> Eli Zaretskii wrote: >>>> From: "Jakob Engblom" <jakob@virtutech.com> >>>> Cc: <gdb-patches@sourceware.org> >>>> Date: Fri, 28 Aug 2009 12:05:29 +0200 >>>> >>>> "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 execution >>>> reaches that start of the inferior. " >>> ^^^^ >>> You meant "the", I presume. >>> >>> Otherwise, this is fine, thanks. >> Would it be more accurate to say "start of the record log"? > > I don't think so, because reverse debugging is not limited to record > and replay. > > But I see what you mean. Maybe this: > > or until the execution reaches the point that is as close to the > inferior's start as @value{GDBN} can. (This could be the start of > the inferior executable code or the start of the record log, for > example.) Yes, that's ok. But I'm struggling to think of a plausible way in which a target could provide reverse debugging without some kind of log. Any stateful program will clobber its state as it runs, and so to go backwards you need to have a log somewhere that tells you what the state was before you clobbered it. And it will not be possible to go backwards to a time before you started recording. Or have I misunderstood you? (Note: I'm more interested in the semantics of reverse debugging here rather than the exact wording in the manual :) Greg -- Greg Law, Undo Software http://undo-software.com/ ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-28 17:12 ` Greg Law @ 2009-08-28 17:34 ` Eli Zaretskii 2009-08-28 18:49 ` Michael Snyder 2009-08-29 7:37 ` Jakob Engblom 1 sibling, 1 reply; 33+ messages in thread From: Eli Zaretskii @ 2009-08-28 17:34 UTC (permalink / raw) To: Greg Law; +Cc: jakob, gdb-patches > Date: Fri, 28 Aug 2009 17:59:50 +0100 > From: Greg Law <glaw@undo-software.com> > CC: jakob@virtutech.com, gdb-patches@sourceware.org > > But I'm struggling to think of a plausible way in which > a target could provide reverse debugging without some kind of log. Don't we have already some kind of that implemented by forking the inferior several times, and then switching to the appropriate fork when the user wants to go backwards? Anyway, a target could conceivably provide reverse execution without any need for GDB to do that for it. I don't think the manual should be too tied to what we currently have, because then it would be a pain to maintain. ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-28 17:34 ` Eli Zaretskii @ 2009-08-28 18:49 ` Michael Snyder 2009-08-28 21:32 ` Eli Zaretskii 0 siblings, 1 reply; 33+ messages in thread From: Michael Snyder @ 2009-08-28 18:49 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Greg Law, jakob, gdb-patches Eli Zaretskii wrote: >> Date: Fri, 28 Aug 2009 17:59:50 +0100 >> From: Greg Law <glaw@undo-software.com> >> CC: jakob@virtutech.com, gdb-patches@sourceware.org >> >> But I'm struggling to think of a plausible way in which >> a target could provide reverse debugging without some kind of log. > > Don't we have already some kind of that implemented by forking the > inferior several times, and then switching to the appropriate fork > when the user wants to go backwards? You're thinking of checkpoint and restart. It does allow you to go back to a previous state, but it's functionally orthogonal to reverse. > Anyway, a target could conceivably provide reverse execution without > any need for GDB to do that for it. I don't think the manual should > be too tied to what we currently have, because then it would be a pain > to maintain. I see your point, but OTOH all of the current implementations rely on a log of some sort, and I agree with Greg that it isn't easy to imagine one that didn't. I think we should mention that "running off the end of the log" is one way in which a reverse continue may terminate, because in fact that is something that may happen in all of the current implementations. ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-28 18:49 ` Michael Snyder @ 2009-08-28 21:32 ` Eli Zaretskii 2009-08-28 23:28 ` Michael Snyder 0 siblings, 1 reply; 33+ messages in thread From: Eli Zaretskii @ 2009-08-28 21:32 UTC (permalink / raw) To: Michael Snyder; +Cc: glaw, jakob, gdb-patches > Date: Fri, 28 Aug 2009 10:35:13 -0700 > From: Michael Snyder <msnyder@vmware.com> > CC: Greg Law <glaw@undo-software.com>, > "jakob@virtutech.com" <jakob@virtutech.com>, > "gdb-patches@sourceware.org" <gdb-patches@sourceware.org> > > I think we should mention that "running off the end of the log" is > one way in which a reverse continue may terminate, because in fact > that is something that may happen in all of the current implementations. Please suggest a wording, and if it's clear, I won't mind. ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-28 21:32 ` Eli Zaretskii @ 2009-08-28 23:28 ` Michael Snyder 2009-08-29 8:12 ` Eli Zaretskii 2009-08-31 12:14 ` Jakob Engblom 0 siblings, 2 replies; 33+ messages in thread From: Michael Snyder @ 2009-08-28 23:28 UTC (permalink / raw) To: Eli Zaretskii; +Cc: glaw, jakob, gdb-patches Eli Zaretskii wrote: >> Date: Fri, 28 Aug 2009 10:35:13 -0700 >> From: Michael Snyder <msnyder@vmware.com> >> CC: Greg Law <glaw@undo-software.com>, >> "jakob@virtutech.com" <jakob@virtutech.com>, >> "gdb-patches@sourceware.org" <gdb-patches@sourceware.org> >> >> I think we should mention that "running off the end of the log" is >> one way in which a reverse continue may terminate, because in fact >> that is something that may happen in all of the current implementations. > > Please suggest a wording, and if it's clear, I won't mind. How about this? (please add markups) Resumes the execution of the inferior program, which will continue to execute until it reaches a debugger stop event. If the @samp{--reverse} option is specified, execution resumes in reverse until it reaches a stop event. Stop events may include * breakpoints or watchpoints * signals or exceptions) * the end of the process (or its beginning if --reverse) * the end (beginning) of a replay log if one is being used. ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-28 23:28 ` Michael Snyder @ 2009-08-29 8:12 ` Eli Zaretskii 2009-08-29 15:19 ` Eli Zaretskii 2009-08-31 12:14 ` Jakob Engblom 1 sibling, 1 reply; 33+ messages in thread From: Eli Zaretskii @ 2009-08-29 8:12 UTC (permalink / raw) To: Michael Snyder; +Cc: glaw, jakob, gdb-patches > Date: Fri, 28 Aug 2009 16:17:57 -0700 > From: Michael Snyder <msnyder@vmware.com> > CC: "glaw@undo-software.com" <glaw@undo-software.com>, > "jakob@virtutech.com" <jakob@virtutech.com>, > "gdb-patches@sourceware.org" <gdb-patches@sourceware.org> > > How about this? (please add markups) > > Resumes the execution of the inferior program, which will continue > to execute until it reaches a debugger stop event. If the > @samp{--reverse} option is specified, execution resumes in reverse until > it reaches a stop event. Stop events may include > * breakpoints or watchpoints > * signals or exceptions) > * the end of the process (or its beginning if --reverse) > * the end (beginning) of a replay log if one is being used. Fine with me (except for a couple of tiny changes). Resumes the execution of the inferior program, which will continue to execute until it reaches a debugger stop event. If the @samp{--reverse} option is specified, execution resumes in reverse until 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 ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-29 8:12 ` Eli Zaretskii @ 2009-08-29 15:19 ` Eli Zaretskii 0 siblings, 0 replies; 33+ messages in thread From: Eli Zaretskii @ 2009-08-29 15:19 UTC (permalink / raw) To: msnyder; +Cc: glaw, jakob, gdb-patches > Date: Sat, 29 Aug 2009 10:53:45 +0300 > From: Eli Zaretskii <eliz@gnu.org> > Cc: glaw@undo-software.com, jakob@virtutech.com, gdb-patches@sourceware.org > > @end @itemize Should be "@end itemize", of course, without the stray @. ^ permalink raw reply [flat|nested] 33+ messages in thread
* RE: GDB MI Reverse Commands added [2 of 3] 2009-08-28 23:28 ` Michael Snyder 2009-08-29 8:12 ` Eli Zaretskii @ 2009-08-31 12:14 ` Jakob Engblom 2009-08-31 13:06 ` Jakob Engblom 2009-08-31 17:56 ` Michael Snyder 1 sibling, 2 replies; 33+ messages in thread From: Jakob Engblom @ 2009-08-31 12:14 UTC (permalink / raw) To: 'Michael Snyder', 'Eli Zaretskii'; +Cc: glaw, gdb-patches > * the end (beginning) of a replay log if one is being used. Subtle question here: does this mean that process record STOPS if you reach the point in time where its recording ends? Or does it just start to extend the recorded execution? I.e., in process record, do you have to record everything first and then debug it? /jakob ^ permalink raw reply [flat|nested] 33+ messages in thread
* RE: GDB MI Reverse Commands added [2 of 3] 2009-08-31 12:14 ` Jakob Engblom @ 2009-08-31 13:06 ` Jakob Engblom 2009-08-31 15:46 ` Hui Zhu ` (3 more replies) 2009-08-31 17:56 ` Michael Snyder 1 sibling, 4 replies; 33+ messages in thread From: Jakob Engblom @ 2009-08-31 13:06 UTC (permalink / raw) To: gdb-patches [-- Attachment #1: Type: text/plain, Size: 9074 bytes --] 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: doc/ * gdb.texinfo (MI commands): Added documentation of --reverse option to a set 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 =================================================================== 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. --- 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. *************** 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,22422 ---- @subsubheading Synopsis @smallexample ! -exec-continue [--reverse] [--all|--thread-group N] @end smallexample ! Resumes the execution of the inferior program, which will continue ! to execute until it reaches a debugger stop event. If the ! @samp{--reverse} option is specified, execution resumes in reverse until ! 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. @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 --- 22442,22455 ---- @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}. --- 22568,22586 ---- @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. 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. + + @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 --- 22602,22608 ---- @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 **** --- 22610,22621 ---- 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 function, + 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 --- 22758,22772 ---- @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,22790 **** @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 ! well. @subsubheading @value{GDBN} Command --- 22804,22819 ---- @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 well. @subsubheading @value{GDBN} Command 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 ________________________________________________________ [-- Attachment #2: gdb.texinfo.diff --] [-- Type: application/octet-stream, Size: 8289 bytes --] 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 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. --- 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. *************** 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,22422 ---- @subsubheading Synopsis @smallexample ! -exec-continue [--reverse] [--all|--thread-group N] @end smallexample ! Resumes the execution of the inferior program, which will continue ! to execute until it reaches a debugger stop event. If the ! @samp{--reverse} option is specified, execution resumes in reverse until ! 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. @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 --- 22442,22455 ---- @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}. --- 22568,22586 ---- @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. 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. + + @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 --- 22602,22608 ---- @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 **** --- 22610,22621 ---- 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 function, + 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 --- 22758,22772 ---- @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,22790 **** @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 ! well. @subsubheading @value{GDBN} Command --- 22804,22819 ---- @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 well. @subsubheading @value{GDBN} Command ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-31 13:06 ` Jakob Engblom @ 2009-08-31 15:46 ` Hui Zhu 2009-08-31 16:47 ` Eli Zaretskii ` (2 subsequent siblings) 3 siblings, 0 replies; 33+ messages in thread From: Hui Zhu @ 2009-08-31 15:46 UTC (permalink / raw) To: Jakob Engblom; +Cc: gdb-patches I think you need write Changelog like: 2009-08-27 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.mi/mi2-var-cmd.exp (create variable with invalid FRAME-ADDR): New. Hui On Mon, Aug 31, 2009 at 20:14, Jakob Engblom<jakob@virtutech.com> wrote: > 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: > > doc/ > * gdb.texinfo (MI commands): Added documentation of --reverse option to a set 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 > =================================================================== > 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. > > --- 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. > > *************** 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,22422 ---- > @subsubheading Synopsis > > @smallexample > ! -exec-continue [--reverse] [--all|--thread-group N] > @end smallexample > > ! Resumes the execution of the inferior program, which will continue > ! to execute until it reaches a debugger stop event. If the > ! @samp{--reverse} option is specified, execution resumes in reverse until > ! 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. > > @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 > > --- 22442,22455 ---- > @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}. > --- 22568,22586 ---- > @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. 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. > + > + > @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 > --- 22602,22608 ---- > @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 **** > --- 22610,22621 ---- > 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 function, > + 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 > > --- 22758,22772 ---- > @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,22790 **** > @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 > ! well. > > @subsubheading @value{GDBN} Command > > --- 22804,22819 ---- > @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 well. > > @subsubheading @value{GDBN} Command > > > > > 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 > ________________________________________________________ > > > > ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-31 13:06 ` Jakob Engblom 2009-08-31 15:46 ` Hui Zhu @ 2009-08-31 16:47 ` Eli Zaretskii 2009-09-01 6:41 ` Jakob Engblom 2009-12-15 19:41 ` Michael Snyder 3 siblings, 0 replies; 33+ messages in thread From: Eli Zaretskii @ 2009-08-31 16:47 UTC (permalink / raw) To: Jakob Engblom; +Cc: gdb-patches > From: "Jakob Engblom" <jakob@virtutech.com> > Date: Mon, 31 Aug 2009 14:14:22 +0200 > > 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. This is fine, thanks. ^ permalink raw reply [flat|nested] 33+ messages in thread
* RE: GDB MI Reverse Commands added [2 of 3] 2009-08-31 13:06 ` Jakob Engblom 2009-08-31 15:46 ` Hui Zhu 2009-08-31 16:47 ` Eli Zaretskii @ 2009-09-01 6:41 ` Jakob Engblom 2009-12-15 19:41 ` Michael Snyder 3 siblings, 0 replies; 33+ messages in thread From: Jakob Engblom @ 2009-09-01 6:41 UTC (permalink / raw) To: Jakob Engblom, gdb-patches > doc/ > * gdb.texinfo (MI commands): Added documentation of --reverse option to a set of > MI commands. Restructured documentation of MI commands --exec-continue to > reflect the complexity of reverse execution. (jakob@virtutech.com) And date and author: 2009-08-31, Jakob Engblom <jakob@virtutech.com> /jakob ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-31 13:06 ` Jakob Engblom ` (2 preceding siblings ...) 2009-09-01 6:41 ` Jakob Engblom @ 2009-12-15 19:41 ` Michael Snyder 2009-12-16 8:01 ` Vladimir Prus 2009-12-16 18:15 ` Eli Zaretskii 3 siblings, 2 replies; 33+ messages in thread From: Michael Snyder @ 2009-12-15 19:41 UTC (permalink / raw) To: Vladimir Prus; +Cc: Jakob Engblom, gdb-patches, Eli Zaretskii Jakob Engblom wrote: > 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: > > doc/ > * gdb.texinfo (MI commands): Added documentation of --reverse option to a set of > MI commands. Restructured documentation of MI commands --exec-continue to > reflect the complexity of reverse execution. (jakob@virtutech.com) Part 2 of the MI reverse patch, awaiting final approval. > 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 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. > > --- 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. > > *************** 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,22422 ---- > @subsubheading Synopsis > > @smallexample > ! -exec-continue [--reverse] [--all|--thread-group N] > @end smallexample > > ! Resumes the execution of the inferior program, which will continue > ! to execute until it reaches a debugger stop event. If the > ! @samp{--reverse} option is specified, execution resumes in reverse until > ! 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. > > @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 > > --- 22442,22455 ---- > @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}. > --- 22568,22586 ---- > @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. 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. > + > + > @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 > --- 22602,22608 ---- > @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 **** > --- 22610,22621 ---- > 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 function, > + 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 > > --- 22758,22772 ---- > @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,22790 **** > @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 > ! well. > > @subsubheading @value{GDBN} Command > > --- 22804,22819 ---- > @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 well. > > @subsubheading @value{GDBN} Command > > > > > 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 > ________________________________________________________ > > > ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-12-15 19:41 ` Michael Snyder @ 2009-12-16 8:01 ` Vladimir Prus 2009-12-16 18:10 ` Eli Zaretskii 2009-12-16 18:15 ` Eli Zaretskii 1 sibling, 1 reply; 33+ messages in thread From: Vladimir Prus @ 2009-12-16 8:01 UTC (permalink / raw) To: Michael Snyder; +Cc: Jakob Engblom, gdb-patches, Eli Zaretskii On Tuesday 15 December 2009 22:38:59 Michael Snyder wrote: > Jakob Engblom wrote: > > 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: > > > > doc/ > > * gdb.texinfo (MI commands): Added documentation of --reverse option to a set of > > MI commands. Restructured documentation of MI commands --exec-continue to > > reflect the complexity of reverse execution. (jakob@virtutech.com) > > Part 2 of the MI reverse patch, awaiting final approval. Personally, I'd find it better if the --reverse option be described in one place, either as top-level section under "MI", and at the begining of "Execution commands" section. But I'll be happy with whatever Eli decides on this matter, and the rest of this patch. Thanks, Volodya ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-12-16 8:01 ` Vladimir Prus @ 2009-12-16 18:10 ` Eli Zaretskii 0 siblings, 0 replies; 33+ messages in thread From: Eli Zaretskii @ 2009-12-16 18:10 UTC (permalink / raw) To: Vladimir Prus; +Cc: msnyder, jakob, gdb-patches > From: Vladimir Prus <vladimir@codesourcery.com> > Date: Wed, 16 Dec 2009 11:00:46 +0300 > Cc: Jakob Engblom <jakob@virtutech.com>, > "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>, > Eli Zaretskii <eliz@gnu.org> > > Personally, I'd find it better if the --reverse option be described > in one place, either as top-level section under "MI", and at the > begining of "Execution commands" section. It doesn't really matter either way, except for one consideration: if someone uses the manual as a reference, and reads only about a single command, they would be surprised to see the description of all the options except one. For this reason, I think it is better to do it the way Jakob wrote the text. If you are still unconvinced, please tell why you prefer to have the description of --reverse in one place. Maybe I'm missing something. ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-12-15 19:41 ` Michael Snyder 2009-12-16 8:01 ` Vladimir Prus @ 2009-12-16 18:15 ` Eli Zaretskii 2009-12-16 19:04 ` Michael Snyder 1 sibling, 1 reply; 33+ messages in thread From: Eli Zaretskii @ 2009-12-16 18:15 UTC (permalink / raw) To: Michael Snyder; +Cc: vladimir, jakob, gdb-patches > Date: Tue, 15 Dec 2009 11:38:59 -0800 > From: Michael Snyder <msnyder@vmware.com> > CC: Jakob Engblom <jakob@virtutech.com>, > "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>, > Eli Zaretskii <eliz@gnu.org> > > Jakob Engblom wrote: > > 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: > > > > doc/ > > * gdb.texinfo (MI commands): Added documentation of --reverse option to a set of > > MI commands. Restructured documentation of MI commands --exec-continue to > > reflect the complexity of reverse execution. (jakob@virtutech.com) > > Part 2 of the MI reverse patch, awaiting final approval. This is fine with me, but please wait with committing until we resolve the issue raised by Vladimir. Oh, and one small correction: > > + If the @samp{--reverse} option is specified, resumes the reverse > > + execution of the inferior program until the point where current > > + function was called. ^^^^^^^^ ^^^^^^^^ "the current function". Thanks. ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-12-16 18:15 ` Eli Zaretskii @ 2009-12-16 19:04 ` Michael Snyder 2009-12-16 20:01 ` Eli Zaretskii 0 siblings, 1 reply; 33+ messages in thread From: Michael Snyder @ 2009-12-16 19:04 UTC (permalink / raw) To: Eli Zaretskii; +Cc: vladimir, jakob, gdb-patches Eli Zaretskii wrote: >> Date: Tue, 15 Dec 2009 11:38:59 -0800 >> From: Michael Snyder <msnyder@vmware.com> >> CC: Jakob Engblom <jakob@virtutech.com>, >> "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>, >> Eli Zaretskii <eliz@gnu.org> >> >> Jakob Engblom wrote: >>> 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: >>> >>> doc/ >>> * gdb.texinfo (MI commands): Added documentation of --reverse option to a set of >>> MI commands. Restructured documentation of MI commands --exec-continue to >>> reflect the complexity of reverse execution. (jakob@virtutech.com) >> Part 2 of the MI reverse patch, awaiting final approval. > > This is fine with me, but please wait with committing until we resolve > the issue raised by Vladimir. I think Vladimir was deferring to you, so we have a reverse deadlock. ;-) > > Oh, and one small correction: > >>> + If the @samp{--reverse} option is specified, resumes the reverse >>> + execution of the inferior program until the point where current >>> + function was called. ^^^^^^^^ > ^^^^^^^^ > "the current function". > > Thanks. ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-12-16 19:04 ` Michael Snyder @ 2009-12-16 20:01 ` Eli Zaretskii 2009-12-16 20:45 ` Vladimir Prus 0 siblings, 1 reply; 33+ messages in thread From: Eli Zaretskii @ 2009-12-16 20:01 UTC (permalink / raw) To: Michael Snyder; +Cc: vladimir, jakob, gdb-patches > Date: Wed, 16 Dec 2009 11:02:33 -0800 > From: Michael Snyder <msnyder@vmware.com> > CC: "vladimir@codesourcery.com" <vladimir@codesourcery.com>, "jakob@virtutech.com" <jakob@virtutech.com>, "gdb-patches@sourceware.org" <gdb-patches@sourceware.org> > > we have a reverse deadlock. ;-) Only if Vladimir is unconvinced. ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-12-16 20:01 ` Eli Zaretskii @ 2009-12-16 20:45 ` Vladimir Prus 2009-12-17 20:15 ` Eli Zaretskii 0 siblings, 1 reply; 33+ messages in thread From: Vladimir Prus @ 2009-12-16 20:45 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Michael Snyder, jakob, gdb-patches On Wednesday 16 December 2009 23:03:12 Eli Zaretskii wrote: > > Date: Wed, 16 Dec 2009 11:02:33 -0800 > > From: Michael Snyder <msnyder@vmware.com> > > CC: "vladimir@codesourcery.com" <vladimir@codesourcery.com>, "jakob@virtutech.com" <jakob@virtutech.com>, "gdb-patches@sourceware.org" <gdb-patches@sourceware.org> > > > > we have a reverse deadlock. ;-) > > Only if Vladimir is unconvinced. I am mildly concerned that the important high-level functionality is only documented as option to specific commands, and as this functionality is exercised and documentation is improved, we'll end up with information scattered over N commands. But let's wait and see -- right now, there's not so much information there. - Volodya ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-12-16 20:45 ` Vladimir Prus @ 2009-12-17 20:15 ` Eli Zaretskii 2010-02-12 21:36 ` Michael Snyder 0 siblings, 1 reply; 33+ messages in thread From: Eli Zaretskii @ 2009-12-17 20:15 UTC (permalink / raw) To: Vladimir Prus; +Cc: msnyder, jakob, gdb-patches > From: Vladimir Prus <vladimir@codesourcery.com> > Date: Wed, 16 Dec 2009 23:45:37 +0300 > Cc: Michael Snyder <msnyder@vmware.com>, > jakob@virtutech.com, > gdb-patches@sourceware.org > > I am mildly concerned that the important high-level functionality is > only documented as option to specific commands, and as this functionality > is exercised and documentation is improved, we'll end up with information > scattered over N commands. Ah, that's a valid concern. How about if we do both: document the "--reverse" option with each command _and_ add a section with an overview of this feature? > But let's wait and see -- right now, there's not so much information > there. Agreed. So the patch is clear to go in, as far as I'm concerned. Thanks. ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-12-17 20:15 ` Eli Zaretskii @ 2010-02-12 21:36 ` Michael Snyder 0 siblings, 0 replies; 33+ messages in thread From: Michael Snyder @ 2010-02-12 21:36 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Vladimir Prus, jakob, gdb-patches Eli Zaretskii wrote: >> From: Vladimir Prus <vladimir@codesourcery.com> >> Date: Wed, 16 Dec 2009 23:45:37 +0300 >> Cc: Michael Snyder <msnyder@vmware.com>, >> jakob@virtutech.com, >> gdb-patches@sourceware.org >> >> I am mildly concerned that the important high-level functionality is >> only documented as option to specific commands, and as this functionality >> is exercised and documentation is improved, we'll end up with information >> scattered over N commands. > > Ah, that's a valid concern. How about if we do both: document the > "--reverse" option with each command _and_ add a section with an > overview of this feature? > >> But let's wait and see -- right now, there's not so much information >> there. > > Agreed. > > So the patch is clear to go in, as far as I'm concerned. Checked in, after private email from Volodya. ^ permalink raw reply [flat|nested] 33+ messages in thread
* Re: GDB MI Reverse Commands added [2 of 3] 2009-08-31 12:14 ` Jakob Engblom 2009-08-31 13:06 ` Jakob Engblom @ 2009-08-31 17:56 ` Michael Snyder 2009-09-01 6:37 ` Jakob Engblom 1 sibling, 1 reply; 33+ messages in thread From: Michael Snyder @ 2009-08-31 17:56 UTC (permalink / raw) To: Jakob Engblom; +Cc: 'Eli Zaretskii', glaw, gdb-patches Jakob Engblom wrote: >> * the end (beginning) of a replay log if one is being used. > > Subtle question here: does this mean that process record STOPS if you reach the > point in time where its recording ends? Or does it just start to extend the > recorded execution? It stops. Extending the recording might be a future enhancement. > I.e., in process record, do you have to record everything first and then debug > it? You can record everything first and then debug it. You can also debug it while you're recording it. I *think* (and this is just based on my experience, Hui may be able to say something different) that the recording mode is "over" as soon as you go into replay mode, and so that represents the "end" of your recording. ^ permalink raw reply [flat|nested] 33+ messages in thread
* RE: GDB MI Reverse Commands added [2 of 3] 2009-08-31 17:56 ` Michael Snyder @ 2009-09-01 6:37 ` Jakob Engblom 0 siblings, 0 replies; 33+ messages in thread From: Jakob Engblom @ 2009-09-01 6:37 UTC (permalink / raw) To: 'Michael Snyder'; +Cc: 'Eli Zaretskii', glaw, gdb-patches > > I.e., in process record, do you have to record everything first and then debug > > it? > > You can record everything first and then debug it. > You can also debug it while you're recording it. > I *think* (and this is just based on my experience, > Hui may be able to say something different) that the > recording mode is "over" as soon as you go into > replay mode, and so that represents the "end" of > your recording. OK. Simics does not have this behavior, if you hit the "last known time" as we call it, the simulation will just continue forward, accumulating reversible state. But I guess that is not an issue, as gdb has no idea of these limits, it is all up to the remote backend. /jakob ^ permalink raw reply [flat|nested] 33+ messages in thread
* RE: GDB MI Reverse Commands added [2 of 3] 2009-08-28 17:12 ` Greg Law 2009-08-28 17:34 ` Eli Zaretskii @ 2009-08-29 7:37 ` Jakob Engblom 1 sibling, 0 replies; 33+ messages in thread From: Jakob Engblom @ 2009-08-29 7:37 UTC (permalink / raw) To: 'Greg Law', 'Eli Zaretskii'; +Cc: gdb-patches > Yes, that's ok. But I'm struggling to think of a plausible way in which > a target could provide reverse debugging without some kind of log. Any > stateful program will clobber its state as it runs, and so to go > backwards you need to have a log somewhere that tells you what the state > was before you clobbered it. And it will not be possible to go > backwards to a time before you started recording. Easy. Deterministic replay. In the case we are reversing a Simics session that has no asynch IO from the outside world, there is no log being used. We are just replaying the same execution scenario from the start. Typical example: initial boot of a system. First, U-Boot comes up, receives scripted input, and fires off a Linux kernel, which also will not communicate with anything uncontrolled until the serial terminal is up at the end of the boot. Until that time, everything is under simulator control and can be replayed without using a log -- all parts of the system, including the network and the simulated DHCP server, are deterministic in the strongest sense. So, no, a "log" is not necessarily the implementation of reversible debug. Normally, a log IS involved if you have asynch interaction with the outside world, but there are many useful simulations that do not do that. A second question here: to me, "inferior" means whatever is being debugged. Is that a correct interpretation? So "inferior" can be a piece of firmware, an operating system, or any other sequence of code to which gdb is attached? I think that some people tend to think of it as user-level programs, which is the common case on desktops, but in the embedded world where I live, most often the inferior is an entire system... and the user programs might be discovered only in the debugger UI that faces the user, while gdb is used to communicate with the taraet machine. So I think of "inferior" as not just user programs. Is that OK? /jakob ^ permalink raw reply [flat|nested] 33+ messages in thread
* RE: GDB MI Reverse Commands added [2 of 3] 2009-08-26 17:38 ` Eli Zaretskii 2009-08-27 13:48 ` Jakob Engblom 2009-08-28 10:08 ` Jakob Engblom @ 2009-08-28 10:44 ` Jakob Engblom 2 siblings, 0 replies; 33+ messages in thread From: Jakob Engblom @ 2009-08-28 10:44 UTC (permalink / raw) To: 'Eli Zaretskii'; +Cc: gdb-patches > > + 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, > ^^^^^^^^^^^^^^^^^^^ > "another instruction" or "another function"? Function. There was also the same mistake in the documentation for the CLI command "reverse-nexti". Fixed it there too. /jakob ^ permalink raw reply [flat|nested] 33+ messages in thread
end of thread, other threads:[~2010-02-12 21:36 UTC | newest] Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-08-26 14:38 GDB MI Reverse Commands added [2 of 3] Jakob Engblom 2009-08-26 17:38 ` Eli Zaretskii 2009-08-27 13:48 ` Jakob Engblom 2009-08-28 10:05 ` Eli Zaretskii 2009-08-28 10:08 ` Jakob Engblom 2009-08-28 10:49 ` Eli Zaretskii 2009-08-28 13:41 ` Greg Law 2009-08-28 14:28 ` Eli Zaretskii 2009-08-28 17:12 ` Greg Law 2009-08-28 17:34 ` Eli Zaretskii 2009-08-28 18:49 ` Michael Snyder 2009-08-28 21:32 ` Eli Zaretskii 2009-08-28 23:28 ` Michael Snyder 2009-08-29 8:12 ` Eli Zaretskii 2009-08-29 15:19 ` Eli Zaretskii 2009-08-31 12:14 ` Jakob Engblom 2009-08-31 13:06 ` Jakob Engblom 2009-08-31 15:46 ` Hui Zhu 2009-08-31 16:47 ` Eli Zaretskii 2009-09-01 6:41 ` Jakob Engblom 2009-12-15 19:41 ` Michael Snyder 2009-12-16 8:01 ` Vladimir Prus 2009-12-16 18:10 ` Eli Zaretskii 2009-12-16 18:15 ` Eli Zaretskii 2009-12-16 19:04 ` Michael Snyder 2009-12-16 20:01 ` Eli Zaretskii 2009-12-16 20:45 ` Vladimir Prus 2009-12-17 20:15 ` Eli Zaretskii 2010-02-12 21:36 ` Michael Snyder 2009-08-31 17:56 ` Michael Snyder 2009-09-01 6:37 ` Jakob Engblom 2009-08-29 7:37 ` Jakob Engblom 2009-08-28 10:44 ` Jakob Engblom
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox