From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48565 invoked by alias); 6 May 2015 14:46:48 -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 48548 invoked by uid 89); 6 May 2015 14:46:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mailrelay108.isp.belgacom.be Received: from mailrelay108.isp.belgacom.be (HELO mailrelay108.isp.belgacom.be) (195.238.20.135) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 May 2015 14:46:46 +0000 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=M25fSHNwW0AVyF8PBjdaZiLQS1FBtLFJFIDkHdlBKq0= c=1 sm=2 a=IkcTkHD0fZMA:10 a=T-LqsdKEFIIrbHC-cmAA:9 a=QEXdDO2ut3YA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2CVAQAAKUpV/7LMgG0NT4dYyioCgXIBAQEBAQGFLAEBBCNWEAsOCgICJgICVwaIRLBHcJQEAQEBAQEBAQMBAQEBAR2BIYoYhQUHgmiBRQEEszWBA4MXgzIBAQE Received: from 178.204-128-109.adsl-dyn.isp.belgacom.be (HELO [192.168.1.15]) ([109.128.204.178]) by relay.skynet.be with ESMTP; 06 May 2015 16:46:24 +0200 Subject: Re: [PATCH] Make only user-specified executable filenames sticky From: Philippe Waroquiers To: Gary Benson Cc: gdb-patches@sourceware.org In-Reply-To: <1430907977-30605-1-git-send-email-gbenson@redhat.com> References: <20150505151448.GA1417@blade.nx> <1430907977-30605-1-git-send-email-gbenson@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Wed, 06 May 2015 14:46:00 -0000 Message-ID: <1430923587.2177.4.camel@soleil> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00105.txt.bz2 On Wed, 2015-05-06 at 11:26 +0100, Gary Benson wrote: > Hi all, > > 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 ? Philippe