From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14837 invoked by alias); 26 Sep 2009 18:35:52 -0000 Received: (qmail 14826 invoked by uid 22791); 26 Sep 2009 18:35:51 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 Sep 2009 18:35:45 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id AD43D19007; Sat, 26 Sep 2009 11:35:43 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost2.vmware.com (Postfix) with ESMTP id 900858E807; Sat, 26 Sep 2009 11:35:43 -0700 (PDT) Message-ID: <4ABE5E8D.8080209@vmware.com> Date: Sat, 26 Sep 2009 18:35:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Hui Zhu CC: Joel Brobecker , "gdb-patches@sourceware.org" Subject: Re: [RFA] let record_resume fail immediately on error References: <4AA5D713.1060305@vmware.com> <20090908065843.GO30677@adacore.com> <4AA68C92.7070905@vmware.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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/msg00838.txt.bz2 Personally, I think this one isn't critical for 7.0. Waiting for 7.1 will allow us more time to assess it. Hui Zhu wrote: > Hi Joel, > > Sorry to disturb you. Ping > http://sourceware.org/ml/gdb-patches/2009-09/msg00231.html > > Thanks, > Hui > > On Wed, Sep 9, 2009 at 10:05, Hui Zhu wrote: >> On Wed, Sep 9, 2009 at 00:55, Michael Snyder wrote: >>> Hui Zhu wrote: >>>> On Tue, Sep 8, 2009 at 15:25, Hui Zhu wrote: >>>>> If GDB call error in record_resume, user cannot keep debug the inferior. >>>>> >>>>> Hui >>>>> >>>>> On Tue, Sep 8, 2009 at 15:23, Hui Zhu wrote: >>>>>> The "record_resume_error" in gdb-cvs is to make user after get a error >>>>>> of record_message, they can "record stop" close the record and keep >>>>>> debug the inferior. >>>>>> >>>>>> Thanks, >>>>>> Hui >>>>>> >>>>>> On Tue, Sep 8, 2009 at 14:58, Joel Brobecker >>>>>> wrote: >>>>>>>> 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.")); >>>>>>>> + >>>>>>> Forgive me if I'm wrong, as I don't know the record.c code at all, but >>>>>>> I cannot help but think that the internal_error is suspicious here. >>>>>>> Why is this an internal_error? >>>>>>> >>>>>>> -- >>>>>>> Joel >>>>>>> >>>> Hi guys, >>>> >>>> I make a patch that make "record_resume_error" work better. I did >>>> some test. It seems better than before. >>> Could you explain what you mean by better? >>> I mean, what behavior are you looking for here? >>> >>> Here is the behavior that I see --- I am making a recording, >>> I say "continue", and after a while this "record_resume_error" >>> is triggered, and gdb stops and says "No more reverse-execution history." >>> >>> I would never expect to see that message during recording. >> In before, GDB cannot throw error in record_resume (It just in my >> memory, maybe I am wrong). >> If we try to do it, it will get: >> (gdb) c >> Continuing. >> Cannot execute this command while the selected thread is running. >> So I add record_resume_error to let record_wait to handle it. >> >> But record_wait cannot call error too. So I let it: >> /* If record_resume get error, return directly. */ >> status->kind = TARGET_WAITKIND_STOPPED; >> status->value.sig = TARGET_SIGNAL_0; >> return inferior_ptid; >> >> But I found that record_resume can call error now. So I make a new >> patch for it. >> >> Could you help me try it? >> >> >> Thanks, >> Hui >> >> 2009-09-09 Hui Zhu >> >> * record.c (record_resume_error): Deleted. >> (record_resume): Call record_message. >> (record_wait): Deleted record_resume_error. >> >> --- >> record.c | 19 +------------------ >> 1 file changed, 1 insertion(+), 18 deletions(-) >> >> --- a/record.c >> +++ b/record.c >> @@ -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, >> @@ -526,15 +525,7 @@ 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; >> - } >> + record_message (get_current_regcache ()); >> record_beneath_to_resume (record_beneath_to_resume_ops, ptid, 1, >> siggnal); >> } >> @@ -586,14 +577,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. */ >>