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: [RFA] let record_resume fail immediately on error


Thanks for your work.
I think this patch is OK.

Hui

On Tue, Sep 8, 2009 at 12:01, Michael Snyder<msnyder@vmware.com> wrote:
> Might as well let record_resume call internal_error if it fails,
> rather than setting a flag and trying to report on it later.
>
> The flag doesn't really work anyway -- looks like you wanted
> record_wait to return SIGABRT (not really the right thing either),
> but it doesn't. ?Instead we somehow return "no more reverse execution
> history".
>
> What do you think, Hui?
>
>
> 2009-09-07 ?Michael Snyder ?<msnyder@vmware.com>
>
> ? ? ? ?* record.c (record_resume): Call internal_error immediately
> ? ? ? ?instead of later.
>
> Index: record.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/record.c,v
> retrieving revision 1.17
> diff -u -p -r1.17 record.c
> --- record.c ? ?8 Sep 2009 00:50:42 -0000 ? ? ? 1.17
> +++ record.c ? ?8 Sep 2009 03:56:09 -0000
> @@ -516,7 +516,6 @@ record_close (int quitting)
> ?}
>
> ?static int record_resume_step = 0;
> -static int record_resume_error;
>
> ?static void
> ?record_resume (struct target_ops *ops, ptid_t ptid, int step,
> @@ -527,14 +526,9 @@ record_resume (struct target_ops *ops, p
> ? if (!RECORD_IS_REPLAY)
> ? ? {
> ? ? ? if (do_record_message (get_current_regcache ()))
> - ? ? ? ?{
> - ? ? ? ? ?record_resume_error = 0;
> - ? ? ? ?}
> - ? ? ?else
> - ? ? ? ?{
> - ? ? ? ? ?record_resume_error = 1;
> - ? ? ? ? ?return;
> - ? ? ? ?}
> + ? ? ? internal_error (__FILE__, __LINE__,
> + ? ? ? ? ? ? ? ? ? ? ? _("record_resume: do_record_message failed."));
> +
> ? ? ? record_beneath_to_resume (record_beneath_to_resume_ops, ptid, 1,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? siggnal);
> ? ? }
> @@ -586,14 +580,6 @@ record_wait (struct target_ops *ops,
>
> ? if (!RECORD_IS_REPLAY)
> ? ? {
> - ? ? ?if (record_resume_error)
> - ? ? ? {
> - ? ? ? ? /* If record_resume get error, return directly. ?*/
> - ? ? ? ? status->kind = TARGET_WAITKIND_STOPPED;
> - ? ? ? ? status->value.sig = TARGET_SIGNAL_ABRT;
> - ? ? ? ? return inferior_ptid;
> - ? ? ? }
> -
> ? ? ? if (record_resume_step)
> ? ? ? ?{
> ? ? ? ? ?/* This is a single step. ?*/
>
>


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