From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30542 invoked by alias); 23 Oct 2009 07:29:29 -0000 Received: (qmail 30530 invoked by uid 22791); 23 Oct 2009 07:29:28 -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-pw0-f49.google.com (HELO mail-pw0-f49.google.com) (209.85.160.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Oct 2009 07:29:24 +0000 Received: by pwj3 with SMTP id 3so2051590pwj.8 for ; Fri, 23 Oct 2009 00:29:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.143.21.41 with SMTP id y41mr744040wfi.209.1256282963088; Fri, 23 Oct 2009 00:29:23 -0700 (PDT) In-Reply-To: References: <20090928160728.GB9003@adacore.com> <20091014024202.GQ5272@adacore.com> <20091015045834.GY5272@adacore.com> <20091015162326.GA5272@adacore.com> <4AD75806.9070705@vmware.com> From: Hui Zhu Date: Fri, 23 Oct 2009 07:29:00 -0000 Message-ID: Subject: Re: [RFA] let record_resume fail immediately on error To: Michael Snyder Cc: Joel Brobecker , "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-10/txt/msg00559.txt.bz2 Ping. On Tue, Oct 20, 2009 at 11:17, Hui Zhu wrote: > Update follow cvs-head. > > Please help me with it. > > Thanks, > Hui > > 2009-10-20 =A0Hui Zhu =A0 > > =A0 =A0 =A0 =A0* record.c (record_resume_error): Deleted. > =A0 =A0 =A0 =A0(record_resume): Call record_message. > =A0 =A0 =A0 =A0(record_wait): Deleted record_resume_error. > =A0 =A0 =A0 =A0Set status when do_record_message need stop the inferior. > > --- > =A0record.c | =A0 29 ++++++++++------------------- > =A01 file changed, 10 insertions(+), 19 deletions(-) > > --- a/record.c > +++ b/record.c > @@ -679,7 +679,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, > @@ -689,15 +688,11 @@ record_resume (struct target_ops *ops, p > > =A0 if (!RECORD_IS_REPLAY) > =A0 =A0 { > - =A0 =A0 =A0if (do_record_message (get_current_regcache (), signal)) > - =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 =A0struct record_message_args args; > + > + =A0 =A0 =A0args.regcache =3D get_current_regcache (); > + =A0 =A0 =A0args.signal =3D signal; > + =A0 =A0 =A0record_message (&args); > =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 signal); > =A0 =A0 } > @@ -749,14 +744,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*/ > @@ -802,7 +789,11 @@ record_wait (struct target_ops *ops, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Therefore we will not ret= urn to gdb. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 Record the insn and resum= e. =A0*/ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (!do_record_message (regcac= he, TARGET_SIGNAL_0)) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 status->kind =3D TA= RGET_WAITKIND_STOPPED; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 status->value.sig = =3D TARGET_SIGNAL_0; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0record_beneath_to_resume (reco= rd_beneath_to_resume_ops, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0ptid, 1, >