From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2290 invoked by alias); 1 Feb 2010 19:20:01 -0000 Received: (qmail 2282 invoked by uid 22791); 1 Feb 2010 19:20:00 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_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; Mon, 01 Feb 2010 19:19:56 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o11JJWks006710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 1 Feb 2010 14:19:33 -0500 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o11JJUM7004828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Feb 2010 14:19:32 -0500 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.3/8.14.3) with ESMTP id o11JJUr9005972; Mon, 1 Feb 2010 20:19:30 +0100 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.3/8.14.3/Submit) id o11JJT2F005970; Mon, 1 Feb 2010 20:19:29 +0100 Date: Mon, 01 Feb 2010 19:20:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFC/ia64] memory error when reading wrong core file Message-ID: <20100201191929.GA5856@host0.dyn.jankratochvil.net> References: <20100129160222.GL26811@adacore.com> <20100201012458.GB6015@host0.dyn.jankratochvil.net> <20100201065327.GM26827@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100201065327.GM26827@adacore.com> User-Agent: Mutt/1.5.20 (2009-08-17) 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: 2010-02/txt/msg00023.txt.bz2 On Mon, 01 Feb 2010 07:53:28 +0100, Joel Brobecker wrote: > > Just if there exists catch_errors shouldn't it be used instead of TRY_CATCH? > > TRY_CATCH was introduced after catch_error, and I *think* that it was > intended as a simpler way to call some code while being able to handle > gdb exceptions. OK, thanks for the info. The code looks better with TRY_CATCH and the longjmp magic is there either way. > That made me wonder, however, why we have 2 routines to do the exception > printing. There's probably some cleanup we could do, there... Yes... :-) > gdb/ChangeLog: > > * solib-svr4.c (solib_svr4_r_map): catch and print all exception > errors while reading the inferior memory, and return zero if > an exception was raised. > > This patch should be strictly equivalent to yours, I believe. I've tested > it against the testcase described in this thread as well as the rest of > AdaCore's testsuite. Retested on RHEL-5.4.ia64 as you asked before. Thanks, Jan