From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8087 invoked by alias); 8 Sep 2009 04:03:02 -0000 Received: (qmail 7805 invoked by uid 22791); 8 Sep 2009 04:02:59 -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; Tue, 08 Sep 2009 04:02:50 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 202B855002; Mon, 7 Sep 2009 21:02:47 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by mailhost4.vmware.com (Postfix) with ESMTP id 146CAC9BAE; Mon, 7 Sep 2009 21:02:47 -0700 (PDT) Message-ID: <4AA5D713.1060305@vmware.com> Date: Tue, 08 Sep 2009 04:03:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: "gdb-patches@sourceware.org" , Hui Zhu Subject: [RFA] let record_resume fail immediately on error Content-Type: multipart/mixed; boundary="------------050004090203050701000303" 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/msg00182.txt.bz2 This is a multi-part message in MIME format. --------------050004090203050701000303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 361 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? --------------050004090203050701000303 Content-Type: text/plain; name="rre.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="rre.txt" Content-length: 1475 2009-09-07 Michael Snyder * 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. */ --------------050004090203050701000303--