From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113024 invoked by alias); 6 May 2015 15:41:46 -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 112341 invoked by uid 89); 6 May 2015 15:41:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 06 May 2015 15:41:44 +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 (8.14.4/8.14.4) with ESMTP id t46FfeCk002892 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 6 May 2015 11:41:40 -0400 Received: from blade.nx (ovpn-116-21.ams2.redhat.com [10.36.116.21]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t46FfdE0022651; Wed, 6 May 2015 11:41:40 -0400 Received: by blade.nx (Postfix, from userid 1000) id C2902263C4D; Wed, 6 May 2015 16:41:38 +0100 (BST) Date: Wed, 06 May 2015 15:41:00 -0000 From: Gary Benson To: Philippe Waroquiers Cc: gdb-patches@sourceware.org, Pedro Alves Subject: Re: [PATCH] Make only user-specified executable filenames sticky Message-ID: <20150506154138.GA24836@blade.nx> References: <20150505151448.GA1417@blade.nx> <1430907977-30605-1-git-send-email-gbenson@redhat.com> <1430923587.2177.4.camel@soleil> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430923587.2177.4.camel@soleil> X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00109.txt.bz2 Philippe Waroquiers wrote: > On Wed, 2015-05-06 at 11:26 +0100, Gary Benson wrote: > > In GDB some executable files are supplied by the user (e.g. using > > a "file" command) and some are determined by GDB (e.g. while > > processing an "attach" command). GDB will not attempt to > > determine a filename if one has been set. This causes problems if > > you attach to one process and then attach to another: GDB will not > > attempt to discover the main executable on the second attach. If > > the two processes have different main executable files then the > > symbols will now be wrong. > > > > This commit updates GDB to keep track of which executable > > filenames were supplied by the user. When GDB might attempt to > > determine an executable filename and one is already set, filenames > > determined by GDB may be overridden but user-supplied filenames > > will not. > > If not overriding the file set by the user, maybe GDB could/should > give a warning when the exec-file reported by the target does not > match the file as set by the user ? I'm wondering whether we should always override the executable file, and treat the symbol file as the special one. Pedro? Cheers, Gary -- http://gbenson.net/