From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9132 invoked by alias); 8 Sep 2009 05:00:00 -0000 Received: (qmail 9092 invoked by uid 22791); 8 Sep 2009 04:59:59 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-px0-f180.google.com (HELO mail-px0-f180.google.com) (209.85.216.180) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Sep 2009 04:59:52 +0000 Received: by pxi10 with SMTP id 10so2801591pxi.24 for ; Mon, 07 Sep 2009 21:59:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.7.6 with SMTP id 6mr529672wfg.114.1252385990087; Mon, 07 Sep 2009 21:59:50 -0700 (PDT) In-Reply-To: <4AA5D713.1060305@vmware.com> References: <4AA5D713.1060305@vmware.com> From: Hui Zhu Date: Tue, 08 Sep 2009 05:00:00 -0000 Message-ID: Subject: Re: [RFA] let record_resume fail immediately on error To: Michael Snyder Cc: "gdb-patches@sourceware.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00183.txt.bz2 Thanks for your work. I think this patch is OK. Hui On Tue, Sep 8, 2009 at 12:01, Michael Snyder 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. =A0Instead we somehow return "no more reverse execution > history". > > What do you think, Hui? > > > 2009-09-07 =A0Michael Snyder =A0 > > =A0 =A0 =A0 =A0* record.c (record_resume): Call internal_error immediately > =A0 =A0 =A0 =A0instead of later. > > Index: record.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /cvs/src/src/gdb/record.c,v > retrieving revision 1.17 > diff -u -p -r1.17 record.c > --- record.c =A0 =A08 Sep 2009 00:50:42 -0000 =A0 =A0 =A0 1.17 > +++ record.c =A0 =A08 Sep 2009 03:56:09 -0000 > @@ -516,7 +516,6 @@ record_close (int quitting) > =A0} > > =A0static int record_resume_step =3D 0; > -static int record_resume_error; > > =A0static void > =A0record_resume (struct target_ops *ops, ptid_t ptid, int step, > @@ -527,14 +526,9 @@ record_resume (struct target_ops *ops, p > =A0 if (!RECORD_IS_REPLAY) > =A0 =A0 { > =A0 =A0 =A0 if (do_record_message (get_current_regcache ())) > - =A0 =A0 =A0 =A0{ > - =A0 =A0 =A0 =A0 =A0record_resume_error =3D 0; > - =A0 =A0 =A0 =A0} > - =A0 =A0 =A0else > - =A0 =A0 =A0 =A0{ > - =A0 =A0 =A0 =A0 =A0record_resume_error =3D 1; > - =A0 =A0 =A0 =A0 =A0return; > - =A0 =A0 =A0 =A0} > + =A0 =A0 =A0 internal_error (__FILE__, __LINE__, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 _("record_resume: do_record= _message failed.")); > + > =A0 =A0 =A0 record_beneath_to_resume (record_beneath_to_resume_ops, ptid,= 1, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 siggnal); > =A0 =A0 } > @@ -586,14 +580,6 @@ record_wait (struct target_ops *ops, > > =A0 if (!RECORD_IS_REPLAY) > =A0 =A0 { > - =A0 =A0 =A0if (record_resume_error) > - =A0 =A0 =A0 { > - =A0 =A0 =A0 =A0 /* If record_resume get error, return directly. =A0*/ > - =A0 =A0 =A0 =A0 status->kind =3D TARGET_WAITKIND_STOPPED; > - =A0 =A0 =A0 =A0 status->value.sig =3D TARGET_SIGNAL_ABRT; > - =A0 =A0 =A0 =A0 return inferior_ptid; > - =A0 =A0 =A0 } > - > =A0 =A0 =A0 if (record_resume_step) > =A0 =A0 =A0 =A0{ > =A0 =A0 =A0 =A0 =A0/* This is a single step. =A0*/ > >