From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9182 invoked by alias); 18 Feb 2016 12:30: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 9109 invoked by uid 89); 18 Feb 2016 12:30:36 -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= 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; Thu, 18 Feb 2016 12:30:35 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id B62E0804F0; Thu, 18 Feb 2016 12:30:33 +0000 (UTC) Received: from blade.nx (ovpn-116-96.ams2.redhat.com [10.36.116.96]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1ICUW8h016981; Thu, 18 Feb 2016 07:30:33 -0500 Received: by blade.nx (Postfix, from userid 1000) id 36A6A2643FF; Thu, 18 Feb 2016 12:30:32 +0000 (GMT) Date: Thu, 18 Feb 2016 12:30:00 -0000 From: Gary Benson To: Luis Machado Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] Remote debugging without a binary (regression) Message-ID: <20160218123032.GA14534@blade.nx> References: <1455200365-5270-1-git-send-email-lgustavo@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1455200365-5270-1-git-send-email-lgustavo@codesourcery.com> X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00540.txt.bz2 Hi Luis, Luis Machado wrote: > The following patch guards such a call to prevent those errors > from disrupting a potential debugging session, and display only > a warning. After looking into this it seems your patch is the right way to go. There is a separate bug in exec_file_locate_attach in that in some cases the sysroot is ignored, but fixing that will not remove the need for what you are proposing. My only nit is that I would prefer the TRY-CATCH block smaller, covering just exec_file_locate_attach, like so: /* If no main executable is currently open then attempt to open the file that was executed to create this inferior. */ if (try_open_exec && get_exec_file (0) == NULL) { /* exec_file_locate_attach may throw an error... TRY { exec_file_locate_attach (pid, 1); } CATCH... Other than that I am ok with this change. Thanks for tracking this down. Cheers, Gary -- http://gbenson.net/