From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24469 invoked by alias); 8 Sep 2009 17:05:25 -0000 Received: (qmail 24323 invoked by uid 22791); 8 Sep 2009 17:05:23 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Sep 2009 17:05:15 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 5CA222BABBD; Tue, 8 Sep 2009 13:05:13 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Rp+JztabD6uC; Tue, 8 Sep 2009 13:05:13 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 122462BAB65; Tue, 8 Sep 2009 13:05:13 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 63A7FF589B; Tue, 8 Sep 2009 10:05:07 -0700 (PDT) Date: Tue, 08 Sep 2009 17:05:00 -0000 From: Joel Brobecker To: Michael Snyder Cc: "gdb-patches@sourceware.org" , Hui Zhu Subject: Re: [RFA] let record_resume fail immediately on error Message-ID: <20090908170507.GQ30677@adacore.com> References: <4AA5D713.1060305@vmware.com> <20090908065843.GO30677@adacore.com> <4AA68B05.5070909@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4AA68B05.5070909@vmware.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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/msg00202.txt.bz2 > It's some kind of error, because we're in the record phase, and > "do_record_message" (which records the side effects of the instruction) > returned failure. Most likely it hit some resource limit, but it is > possible that something else happened like trying to read from an > unreadable memory location. > > You think simple error would be better? To me, I see internal_errors as programing errors. From what you are saying above, calling error would be more appropriate. Taking a step back, if you had in fact hit a resource limit in do_record_message, wouldn't it have been better to report the error there? The error could then be a lot more precise and informative. However, I see that do_record_message is a simple catch_errors wrapper, so the error would be trapped, and your error-condition-checking code would not trigger (catch_errors return zero in that case)... In any case, these are just idle thoughts - improvements if any can be done as part of another patch. -- Joel