From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53215 invoked by alias); 11 May 2015 20:25:14 -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 53206 invoked by uid 89); 11 May 2015 20:25:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,KAM_BODY_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mail-oi0-f53.google.com Received: from mail-oi0-f53.google.com (HELO mail-oi0-f53.google.com) (209.85.218.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 11 May 2015 20:25:11 +0000 Received: by oign205 with SMTP id n205so114035100oig.2 for ; Mon, 11 May 2015 13:25:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=iKyFYCovOhtaNjxJTkHskRW+DruaBvntA6U4cnGmQP4=; b=J5TCmDvDacqLxtuY5pzx0T7nfPT32XwytII1SIxS+zzEFr28d6oBFFcspW7MdWiD47 1UGIQTvJFPYQtDqk8VnO3LniLHGofs6ZbXpG9OpPiPheV80qjp0OvRW7/ox/crLDB3rR qXlO1a7G4CViEUnSPBMHOkBtnmCBKKWk2EjG0CqLpCSvx9Yob2fXbWXrKZZ/okAX+Ysy QL7XAbYPZHz7lhr57PEpC68zO+woOrRbfmVO95TuShJLLG+l6CGoOnG89mw3abFbV6yC hatUPe4fo+jXu2emjVlP5yUbjYnSznTdLLrf8AqFkE+WPX3XCXth28wnZL6xMLZfhHbT V+iA== X-Gm-Message-State: ALoCoQn36jYYyWJLRQ/J4pYEwlVWT++0oziGBaN9WqPgWY4DVJMJIPdYs5DwUBVZ7LliTpOqeF3y MIME-Version: 1.0 X-Received: by 10.202.84.135 with SMTP id i129mr8746781oib.114.1431375909706; Mon, 11 May 2015 13:25:09 -0700 (PDT) Received: by 10.182.89.99 with HTTP; Mon, 11 May 2015 13:25:09 -0700 (PDT) In-Reply-To: <1430923587.2177.4.camel@soleil> References: <20150505151448.GA1417@blade.nx> <1430907977-30605-1-git-send-email-gbenson@redhat.com> <1430923587.2177.4.camel@soleil> Date: Mon, 11 May 2015 20:25:00 -0000 Message-ID: Subject: Re: [PATCH] Make only user-specified executable filenames sticky From: Doug Evans To: Philippe Waroquiers Cc: Gary Benson , gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg00261.txt.bz2 On Wed, May 6, 2015 at 7:46 AM, Philippe Waroquiers wrote: > 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 ? Heh. +1 [I don't have a strong opinion on how to perform the file matching test, just that some notification should be given, especially if the files in fact don't match.]