From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13494 invoked by alias); 11 Dec 2013 19:17:25 -0000 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 Received: (qmail 13474 invoked by uid 89); 11 Dec 2013 19:17:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Dec 2013 19:17: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 rBBJHJZj006675 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 11 Dec 2013 14:17:19 -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 rBBJHH2S019308; Wed, 11 Dec 2013 14:17:18 -0500 Message-ID: <52A8BA3D.9020403@redhat.com> Date: Wed, 11 Dec 2013 19:17:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: Doug Evans CC: Hui Zhu , gdb-patches ml Subject: Re: [PATCH] Eliminate UNSUPPORTED_ERROR. References: <5265022F.8060203@mentor.com> <52654A2C.9010202@redhat.com> <529707C7.4040504@mentor.com> <5298AE7C.6020607@redhat.com> <529C80D2.2080608@mentor.com> <529C9B42.20600@redhat.com> <529D62F7.80701@mentor.com> <52A22582.8040509@redhat.com> <52A40015.207@mentor.com> <52A61E86.3020005@redhat.com> <52A750AA.1080807@redhat.com> <52A75A05.60006@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-12/txt/msg00446.txt.bz2 On 12/11/2013 04:33 PM, Doug Evans wrote: >> > - /* Should we fallback to ye olde GDB script mode? */ >> > - if (script_ext_mode == script_ext_soft >> > - && e.reason == RETURN_ERROR && e.error == UNSUPPORTED_ERROR) >> > - { >> > - fseek (stream, 0, SEEK_SET); >> > - script_from_file (stream, (char*) file); >> > - } >> > - else >> > - { >> > - /* Nope, just punt. */ >> > - throw_exception (e); >> > - } >> > + /* Fallback to GDB script mode. */ >> > + fseek (stream, 0, SEEK_SET); >> > + script_from_file (stream, (char*) file); > Remove the fseek and cast. Hmm, indeed the fseek doesn't look necessary. Will do. However, that makes me wonder whether I'm missing something, as it doesn't look necessary before my patch either. Was it ever really needed? I see you added it (and the unnecessary cast too ;-) ) in: https://www.sourceware.org/ml/gdb-patches/2010-04/msg00110.html but I can't tell why. -- Pedro Alves