This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [reverse RFA] record_wait return TARGET_WAITKIND_NO_HISTORY
- From: teawater <teawater at gmail dot com>
- To: "Michael Snyder" <msnyder at vmware dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Sat, 20 Sep 2008 14:40:17 +0800
- Subject: Re: [reverse RFA] record_wait return TARGET_WAITKIND_NO_HISTORY
- References: <48D3F039.6060608@vmware.com>
(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.
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;
>
>