This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [reverse RFA] record_wait return TARGET_WAITKIND_NO_HISTORY


teawater wrote:
(gdb) rc
Continuing.

No more reverse-execution history.
main () at 1.c:20
20             int     b = 0;
(gdb) c


Waul. It's cool. Please check it in.

Committed (branch), thanks.


BTW I still not when you add "No more reverse-execution history." to
infrun.c. That's great.


Thanks, Hui

On Sat, Sep 20, 2008 at 02:32, Michael Snyder <msnyder@vmware.com> wrote:
When we reach the ends of the recorded log, we should
return this flag to infrun and let infrun decide what
to do from there.


2008-09-19 Michael Snyder <msnyder@vmware.com>


       * record.c (record_wait): On end of record log, return
       TARGET_WAITKIND_NO_HISTORY and let infrun decide what to do.

Index: record.c
===================================================================
RCS file: /cvs/src/src/gdb/Attic/record.c,v
retrieving revision 1.1.2.12
diff -u -p -r1.1.2.12 record.c
--- record.c    18 Sep 2008 17:17:42 -0000      1.1.2.12
+++ record.c    19 Sep 2008 18:29:51 -0000
@@ -551,22 +551,23 @@ record_wait (ptid_t ptid, struct target_
         record_list = record_list->next;
       }

-      /* Loop over the record_list, looking for the next place to stop.  */
+      /* Loop over the record_list, looking for the next place to
+        stop.  */
+      status->kind = TARGET_WAITKIND_STOPPED;
      do
       {
-         /* check state */
-         if (record_execdir == EXEC_REVERSE && record_list ==
&record_first)
+         /* Check for beginning and end of log.  */
+         if (record_execdir == EXEC_REVERSE
+             && record_list == &record_first)
           {
-             fprintf_unfiltered (gdb_stdlog,
-                                 "Record: running to the begin of record
list.\n");
-             stop_soon = STOP_QUIETLY;
+             /* Hit beginning of record log in reverse.  */
+             status->kind = TARGET_WAITKIND_NO_HISTORY;
             break;
           }
         if (record_execdir != EXEC_REVERSE && !record_list->next)
           {
-             fprintf_unfiltered (gdb_stdlog,
-                                 "Record: running to the end of record
list.\n");
-             stop_soon = STOP_QUIETLY;
+             /* Hit end of record log going forward.  */
+             status->kind = TARGET_WAITKIND_NO_HISTORY;
             break;
           }

@@ -722,7 +723,6 @@ next:
         perror_with_name (_("Record: sigaction"));
       }

-      status->kind = TARGET_WAITKIND_STOPPED;
      if (record_get_sig)
       {
         status->value.sig = TARGET_SIGNAL_INT;




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]