From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121625 invoked by alias); 22 Feb 2016 10:40:42 -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 121600 invoked by uid 89); 22 Feb 2016 10:40:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=66, Hx-languages-length:1251 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 22 Feb 2016 10:40:37 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id CE44D6439A; Mon, 22 Feb 2016 10:40:35 +0000 (UTC) Received: from blade.nx (ovpn-116-96.ams2.redhat.com [10.36.116.96]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1MAeYec025981; Mon, 22 Feb 2016 05:40:35 -0500 Received: by blade.nx (Postfix, from userid 1000) id 66C2226442D; Mon, 22 Feb 2016 10:40:34 +0000 (GMT) Date: Mon, 22 Feb 2016 10:40:00 -0000 From: Gary Benson To: Luis Machado Cc: gdb-patches@sourceware.org, Pedro Alves Subject: Re: [PATCH v2] Fix logic in exec_file_locate_attach Message-ID: <20160222104034.GA31531@blade.nx> References: <20160219102447.GA29870@blade.nx> <1455880879-310-1-git-send-email-gbenson@redhat.com> <56C736ED.9040505@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56C736ED.9040505@codesourcery.com> X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00642.txt.bz2 Luis Machado wrote: > On 02/19/2016 09:21 AM, Gary Benson wrote: > > This is an updated version of the patch I posted yesterday. > > It fails silently rather than throwing if the executable is > > not in the sysroot, which both fixes the sysroot-escape issue > > and results in a better GDB session for the user. > > > > Built and regtested on RHEL 6.6 x86_64. > > > > Luis, I think this patch will fix your connection drop without > > any further changes. Could you test it please? > > Unfortunately it doesn't completely solve the problem i saw, as > exec_file_find will still potentially throw errors and will disrupt > the connection attempt or stop execution of a custom sequence of > commands (as Pedro noted) when "attach" is part of the sequence. > > define foo > attach > >>>> execution stops here if an error is thrown > info threads > info registers > end > > It still looks like a TRY/CATCH block is needed around at least > exec_file_find. What is throwing in exec_file_find? I'm just seeing lots of calls to gdb_open_cloexec and openp, and I don't think either of those should throw except for assertion failures or running out of memory. Cheers, Gary -- http://gbenson.net/