From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26156 invoked by alias); 11 Dec 2012 10:35:32 -0000 Received: (qmail 26067 invoked by uid 22791); 11 Dec 2012 10:35:31 -0000 X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 11 Dec 2012 10:35:23 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBBAZFsK019718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 11 Dec 2012 05:35:16 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qBBAZDHv013577; Tue, 11 Dec 2012 05:35:14 -0500 Message-ID: <50C70C60.6080707@redhat.com> Date: Tue, 11 Dec 2012 10:35:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Tom Tromey CC: Hui Zhu , gdb-patches ml , Hui Zhu Subject: Re: [PATCH] Add fseek to ui-file References: <87txryx36w.fsf@fleche.redhat.com> <50C1BD45.9080709@redhat.com> <87zk1lel8o.fsf@fleche.redhat.com> In-Reply-To: <87zk1lel8o.fsf@fleche.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: 2012-12/txt/msg00313.txt.bz2 On 12/10/2012 07:54 PM, Tom Tromey wrote: >>>>>> "Hui" == Hui Zhu writes: > > Pedro> I think that if we want to support error handling, then this should > Pedro> return the fseek result to the caller instead of throwing an exception. > Pedro> See e.g., the comment in stdio_file_write. > > I wonder whether that comment is correct. http://sourceware.org/ml/gdb-patches/2008-12/msg00260.html And if that didn't crash that way, I think we'd end up with infinite recursion: error -> ui-file (output exception text) -> that fails -> error -> ui-file (output exception text) -> that fails ... -- Pedro Alves